This is "using C # To develop smartphone software: Push box"
SeriesArticle18th. This article introduces the window/selectleveldlg. Cs SOURCEProgramFile. This source program file contains selectleveldlg
Class, which is inherited from the system. Windows. Forms. Form class, indicating the "select" dialog box of the push box. As shown in:
The following is the source program of window/selectleveldlg. Designer. CS.Code:
Namespace Skyiv. Ben. pushbox. Window
{
Partial Class Selectleveldlg
{
// Some code is omitted here
Private System. Windows. Forms. numericupdown nudmain;
Private System. Windows. Forms. Button btnok;
Private System. Windows. Forms. Button btncancel;
Private System. Windows. Forms. Label lblmsg;
Private System. Windows. Forms. Label label2;
}
}
The following is the source code of selectleveldlg. CS:
1 Using System;
2 Using System. Windows. forms;
3
4 Namespace Skyiv. Ben. pushbox. Window
5 {
6 /// <Summary>
7 /// "Select a parameter" dialog box
8 /// </Summary>
9 Public Partial Class Selectleveldlg: Form
10 {
11 Public Int Maxlevel { Set {Nudmain. Maximum = Value ;}}
12 Public Int Level { Get { Return ( Int ) Nudmain. Value - 1 ;} Set {Nudmain. Value = Value + 1 ;}}
13
14 Public Selectleveldlg ( Bool Istopmost)
15 {
16 Initializecomponent ();
17 Topmost = Istopmost;
18 }
19
20 Protected Override Void Onload (eventargs E)
21 {
22 Base . Onload (E );
23 Lblmsg. Text + = Nudmain. Maximum. tostring ();
24 }
25 }
26 }
The code for this class is very simple and I will not explain it much.
Previous Article: Using C # To develop smartphone software: Push box (17th)
Next article: use C # To develop the smartphone software: Push box (19th)
Returned directory