tailieunhanh - Visual Basic .NET at Work Building 10 Enterprise Projects phần 5

Mặc dù bạn đã không làm bất cứ điều gì với nó, bạn sẽ thấy rằng hình thức có tất cả các điều khiển từ hình thức cơ sở đã được tại chỗ. Một điểm quan trọng cần lưu ý ở đây là các điều khiển từ hình thức cơ sở đã bị khóa và không có thể được chỉnh sửa trong thiết kế Form. | 186 Project 5 Table The Checkbox Dialog Properties PROPERTY PURPOSE CheckboxWLabel The text displayed next to the check box describing the option you are providing. CheckboxWProperty A name for the property that represents that value stored in the check box. This name will be referenced by the Installer elsewhere and must be all uppercase. CheckboxWValue The initial value of the check box Checked or Unchecked. CheckboxWVisible Indicates whether or not the control is visible on the form. We are using only a single check box in our case so make sure you set the Visible property of all but the first check box to false. The rest of the settings in the Properties window should be adjusted as shown in Figure . Note the name we have supplied in the Checkbox1Property field BINSTALLDB. We will use this name later to refer to the check box allowing us to reference the value the user selected. That takes care of setting up and defining our dialog. Now we have to make use of the check box we provided to the user. We will set a File Condition that will only install the database file if the check box is on. Return to the File Editor and select the file. Enter the following condition into the Condition field of the Properties window BINSTALLDB 1 If this condition equates to true meaning that the check box we created is in fact checked the file will be installed. Otherwise it will be ignored. Adding a Custom Action The Windows Installer gives you the opportunity to execute any code of your own when an installation task deployment rollback uninstall etc. has completed. You can either use a canned action that comes with the installation tools or write custom code of your own. To illustrate the process we are going to create a simple custom process that displays a Thank You message box to users stating that we appreciate that they have installed our bug-tracking product. You can create any sort of executable that you like and run it when the installation is over. I

TỪ KHÓA LIÊN QUAN