This is "using C # To develop smartphone software: Push box"
Series Article 17th. In this article, we will introduce the window/selectgroupdlg. Cs SOURCE Program File. This source file contains selectgroupdlg
Class, which is inherited from the system. Windows. Forms. Form class, indicating the "select group" dialog box for pushing the box. As shown in:
The following is the source program of window/selectgroupdlg. Designer. CS.Code:
Namespace Skyiv. Ben. pushbox. Window
{
Partial Class Selectgroupdlg
{
// Some code is omitted here
Private System. Windows. Forms. Button btnok;
Private System. Windows. Forms. Button btncancel;
Private System. Windows. Forms. ListBox lbxgroup;
}
}
The following is the source code of selectgroupdlg. CS:
1 Using System. Windows. forms;
2
3 Namespace Skyiv. Ben. pushbox. Window
4 {
5 /// <Summary>
6 /// "Select group" dialog box
7 /// </Summary>
8 Public Partial Class Selectgroupdlg: Form
9 {
10 Public String [] Groups { Set {Lbxgroup. datasource = Value ;}}
11
12 Public Int Group
13 {
14 Get { Return Lbxgroup. selectedindex ;}
15 Set {Lbxgroup. selectedindex = Value ;}
16 }
17
18 Public Selectgroupdlg ( Bool Istopmost)
19 {
20 Initializecomponent ();
21 Topmost = Istopmost;
22 }
23 }
24 }
The code for this class is very simple and I will not explain it much.
Previous Article: Using C # To develop the smartphone software: Push box (16)
Next article: use C # To develop the smartphone software: Push box (18th)
Returned directory