Developing smartphone software using C #: Push Chests (18)

Source: Internet
Author: User

This is the 18th article in the series "Developing smartphone software using C #: Pushing Chests". In this article, the Window/selectleveldlg.cs source program files are introduced. This source program file contains the Selectleveldlg class, which inherits from the System.Windows.Forms.Form class, which represents the "Select Off" dialog box for the Push box. As shown in the following:


Here is a partial code for the source program of Window/selectleveldlg.designer.cs:

namespaceSkyiv.Ben.PushBox.Window
{
PartialclassSelectleveldlg
{

//some code is omitted here.

PrivateSystem.Windows.Forms.NumericUpDown Nudmain;
PrivateSystem.Windows.Forms.Button Btnok;
PrivateSystem.Windows.Forms.Button Btncancel;
PrivateSystem.Windows.Forms.Label lblmsg;
PrivateSystem.Windows.Forms.Label Label2;
}
}

Here is the source code for SelectLevelDlg.cs:

1usingSystem;
2 usingSystem.Windows.Forms;
3
4namespaceSkyiv.Ben.PushBox.Window
5{
6  /// <summary>
7  ///the Select Off dialog box
8  /// </summary>
9   PublicPartialclassSelectleveldlg:form
Ten  {
One     Public intMaxlevel {Set{nudmain.maximum=value;} }
A     Public intLevel {Get { return (int) Nudmain.value- 1; } Set{Nudmain.value=value+ 1; } }
-
-     PublicSelectleveldlg (BOOListopmost)
the {
-InitializeComponent ();
-topmost=Istopmost;
-    }
+
-     protected Override voidOnLoad (EventArgs e)
+    {
A      Base. OnLoad (e);
atLblmsg.text+=nudMain.Maximum.ToString ();
-    }
-  }
-}

Copyright NOTICE: This article for Bo Master http://www.zuiniusn.com original article, without Bo Master permission not reproduced.

Developing smart phone software using C #: Push Chests (18)

Related Article

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.