使用用户输入的数据查询数据库的任何应用程序(包括Windows窗体应用程序)都是Injection攻击的潜在目标。
Any application that queries a database using user-entered data, including Windows Forms applications is a potential target of an injection attack.
当和一个Windows窗体应用程序通信,并显示接收到的数据,例如在文本框,有问题会出现,即,串行端口和文本框使用不同的线程。
When communicating with a Windows Forms application and displaying the received data, for instance in a textbox, the problem occurs, that the serial port and the textbox are using different threads.
使用窗体身份验证时通常使用此类型的表,而且在许多应用程序中,密码以明文形式存储。
This sort of table is commonly used when employing forms authentication, and in many applications the passwords are stored as clear text.
这就是第一次加载应用程序时所显示的窗体。
This is the form that's displayed when the application is first loaded.
当你在窗体中设置好了所有的控件,并编写了使它们共同工作的代码,你将要部署此应用程序。
When you finally have all the controls you need on your forms and the code needed to make them work together, you'll have an application that you still need to deploy.
您不能以递增方式生成窗体设计器—也就是说,您不能实现一个服务,测试应用程序,然后编写另一个服务。
You can't build the forms designer incrementally-that is, you can't implement one service, test the application, and then write another service.
您还可以从工具箱将这些对象拖放到窗体以创建应用程序。
You can also drag and drop these objects from the toolbar onto forms to create applications.
如果您已经查看了示例应用程序并且运行窗体设计器,则您可能想知道所有这些服务是如何集成在一起的。
If you've taken a look at the sample application and run the forms designer, you may be wondering how all of the services have come together.
对于任何超越了简单窗体的应用程序,几乎肯定需要有一个窗体设计工具。
For any application that goes beyond a few simple forms, you almost certainly want to have a form-designer tool.
然后,您可以在应用程序开发中使用格式化和类型化的数据集,包括可以使用数据窗体向导生成数据窗体。
You can then use your formatted and typed dataset in your application development, including the ability to generate data forms using the data form wizard.
在空闲时候,该UI线程同样要对应用程序的窗体消息队列中的所有消息进行负责。
During idle time, the UI thread is also responsible for processing all messages in the application's Windows message queue.
您可将数据源拖放到应用程序中的一个窗体中,这将自动在窗体中创建默认用户界面控件并生成所有必需的代码。
You can drag and drop the data source onto a form in the application, which automatically creates a default user interface control in the form and generates all the necessary code.
当启动待测试应用程序后,我模拟用户操作应用程序窗体。
After I've launched the application under test, I simulate a user manipulating the application form.
对于应用程序开发,除了可以拖放数据对象外,还可以使用数据适配器向导将这些数据适配器拖放到窗体中并配置它们。
For application development, in addition to being able to drag and drop data objects, you could also drag and drop these data adapters onto forms and configure them using the data adapter wizard.
就像一个典型窗体程序里的其它代码一样,任何驻留在一个定时器事件处理函数(指的是该类型的定时器类)中的代码也是使用应用程序的UI线程所执行。
Just like the rest of the code in a typical Windows Forms application, any code that resides inside a timer event handler (for this type of timer class) is executed using the application's UI thread.
可以通过仅将单行代码添加到窗体的Load事件并使用DataSet填充DataAdapter来完成简单的Windows应用程序。
You can complete the simple windows application by just adding a single line of code to the Load event of the form to fill the DataAdapter using the DataSet.
因此,这个静态hashtable(在应用程序的生存期内一直存在)永远不会删除引用每个窗体的那些键。
Therefore, this static hashtable, which essentially existed for the life of the application itself, was never removing the keys that referenced each form.
因为颜色合成器应用程序只是一个Windows窗体,所以我声明一个Form对象来表示它。
Because the color mixer application is just one Windows Form, I declare a Form object to represent it.
使用System . Threading中的方法来从控制台应用程序测试管理启动窗体。
I use methods in System.Threading to launch the form from the console application test harness.
现在,我将重点说明如何在基于Windows窗体的应用程序中使用资源文件。
Now I am going to focus on using resource files in a Windows Forms-based application.
对于Microsoft . Net客户端,您要开发一个客户端应用程序窗体,其中包括文本框和按钮,如图6。
For the Microsoft.net client, you should develop a client application window with similar text boxes and buttons to those shown in Figure 6.
通过使用图形用户界面,用户可以创建窗体,向窗体中添加控件,然后连接这些控件的事件来创建Palm应用程序。
By using a graphical interface, the user could create forms, populate them with controls, and then wire events from these controls to create the Palm application.
创建表示应用程序窗体类型的Type对象之后,我使用Type .GetField方法检索Form对象中指定字段(控件)的信息。
After creating a type object that represents the application form's type, I retrieve information about a specified field (a control) on the form object by using the Type.GetField method.
LaunchApp方法接受应用程序可执行文件的路径和应用程序窗体的名称,并返回一个表示该窗体的对象。
The LaunchApp method accepts the path to the application executable and the name of the application form, and returns an object representing the form.
我这里所做的移动窗体和改变窗体大小实际上与测试应用程序功能并不相关,但我想通过它告诉您如何实现以防您的测试方案需要。
Moving and resizing the form as I've done here isn't really relevant for testing the application's functionality but I do it to show you how it's done in case your test scenario requires it.
首先使用Object . GetType创建表示应用程序窗体的Type对象。
I start by using Object.GetType to create a Type object that represents the application form.
这些场景可以支持各种各样的应用程序和服务,比如基于应用程序日志或窗体(例如,XHTML、XFORMS 或 LotusForms)的应用程序。
These scenarios can support a variety of applications and services, such as application logging or forms based (for example, XHTML, XFORMS, or Lotus Forms) applications.
这个演示应用程序向你展示了如何在一个窗体中,使用一幅图片和一个标签来模仿一个标题栏。
This demo app shows you how to use a picture and a label to simulate a title bar on a form.
这个演示应用程序向你展示了如何在一个窗体中,使用一幅图片和一个标签来模仿一个标题栏。
This demo app shows you how to use a picture and a label to simulate a title bar on a form.
应用推荐