Use C # To develop the smartphone software: Push box (18th)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.