• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NumericUpDown类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NumericUpDown的典型用法代码示例。如果您正苦于以下问题:C# NumericUpDown类的具体用法?C# NumericUpDown怎么用?C# NumericUpDown使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NumericUpDown类属于命名空间,在下文中一共展示了NumericUpDown类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetNumericUpDown

 public static NumericUpDown GetNumericUpDown(int min, int max)
 {
     NumericUpDown num = new NumericUpDown();
     num.Minimum = min;
     num.Maximum = max;
     return num;
 }
开发者ID:numerodix,项目名称:solarbeam,代码行数:7,代码来源:ToolTipTest.cs


示例2: ToolStripNumericUpDownItem

 public ToolStripNumericUpDownItem()
     : base(new NumericUpDown())
 {
     numericUpDown = (NumericUpDown)this.Control;
     numericUpDown.AutoSize = false;
     numericUpDown.Maximum = 1000;
     numericUpDown.Size = new Size(30, 20);
 }
开发者ID:pyro-dragon,项目名称:AwesomeCanvas,代码行数:8,代码来源:ToolStripNumericUpDown.cs


示例3: TestActualWidthOfNumericUpDownControl

 public void TestActualWidthOfNumericUpDownControl()
 {
     NumericUpDown nud = new NumericUpDown();
     nud.Width = 150;
     TestAsync(
         nud,
         () => Assert.AreEqual(nud.ActualWidth, nud.Width));
 }
开发者ID:modulexcite,项目名称:SilverlightToolkit,代码行数:8,代码来源:NumericUpDownTest.Regressions.cs


示例4: NumericUpDownAutomationPeerTypeAndClass

 public virtual void NumericUpDownAutomationPeerTypeAndClass()
 {
     NumericUpDown item = new NumericUpDown();
     NumericUpDownAutomationPeer peer = null;
     TestAsync(
         item,
         () => peer = FrameworkElementAutomationPeer.CreatePeerForElement(item) as NumericUpDownAutomationPeer,
         () => Assert.AreEqual(AutomationControlType.Spinner, peer.GetAutomationControlType(), "Unexpected AutomationControlType!"),
         () => Assert.AreEqual("NumericUpDown", peer.GetClassName(), "Unexpected ClassType!"));
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:10,代码来源:NumericUpDownAutomationPeerTest.cs


示例5: NumericUpDownCreatesAutomationPeer

 public virtual void NumericUpDownCreatesAutomationPeer()
 {
     NumericUpDown item = new NumericUpDown();
     NumericUpDownAutomationPeer peer = null;
     TestAsync(
         item,
         () => peer = FrameworkElementAutomationPeer.CreatePeerForElement(item) as NumericUpDownAutomationPeer,
         () => Assert.IsNotNull(peer, "NumericUpDown peer should not be null!"),
         () => Assert.AreEqual(item, peer.Owner, "NumericUpDown should be owner of the peer!"));
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:10,代码来源:NumericUpDownAutomationPeerTest.cs


示例6: NumericUpDownStripItem

    public NumericUpDownStripItem(FormForImageDisplay Parent)
        : base(new NumericUpDown())
    {
        this.ThisNumericUpDown = this.Control as NumericUpDown;

        this.ThisNumericUpDown.Maximum = 2000;
        this.Size = new System.Drawing.Size(83, 20);
        this.Parent = Parent;

        this.ThisNumericUpDown.ValueChanged += new EventHandler(ThisNumericUpDown_ValueChanged);
    }
开发者ID:cyrenaique,项目名称:HCSA,代码行数:11,代码来源:StatusStripOptions.cs


示例7: mnuChangeDarkness

        public mnuChangeDarkness(string name, int price)
            : base(name)
        {
            this.price = price;
            this.Size = new Size(250, 250);
            this.MenuDirection = Enums.MenuDirection.Vertical;
            this.Location = Client.Logic.Graphics.DrawingSupport.GetCenter(Windows.WindowSwitcher.GameWindow.MapViewer.Size, this.Size);

            lblAddTile = new Label("lblAddTile");
            lblAddTile.Location = new Point(25, 15);
            lblAddTile.AutoSize = false;
            lblAddTile.Size = new System.Drawing.Size(this.Width - lblAddTile.X * 2, 40);
            lblAddTile.Text = "Enter the size of the lights for the house (use -1 for full lighting):";
            lblAddTile.ForeColor = Color.WhiteSmoke;

            nudAmount = new NumericUpDown("nudAmount");
            nudAmount.Size = new Size(120, 24);
            nudAmount.Location = new Point(lblAddTile.X, lblAddTile.Y + lblAddTile.Height + 10);
            nudAmount.Maximum = 20;
            nudAmount.Minimum = -1;
            nudAmount.Value = Logic.Maps.MapHelper.ActiveMap.Darkness;
            nudAmount.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudAmount_ValueChanged);

            lblPrice = new Label("lblPrice");
            lblPrice.Location = new Point(lblAddTile.X, nudAmount.Y + nudAmount.Height + 10);
            lblPrice.AutoSize = false;
            lblPrice.Size = new System.Drawing.Size(180, 40);
            lblPrice.Text = "Adjusting the lighting will cost " + price + " " + Items.ItemHelper.Items[1].Name + ".";
            lblPrice.ForeColor = Color.WhiteSmoke;

            btnAccept = new Button("btnAccept");
            btnAccept.Location = new Point(lblAddTile.X, lblPrice.Y + lblPrice.Height + 10);
            btnAccept.Size = new Size(80, 30);
            btnAccept.Text = "Set Lights";
            btnAccept.Font = FontManager.LoadFont("tahoma", 10);
            Skins.SkinManager.LoadButtonGui(btnAccept);
            btnAccept.Click += new EventHandler<MouseButtonEventArgs>(btnAccept_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(btnAccept.X + btnAccept.Width, lblPrice.Y + lblPrice.Height + 10);
            btnCancel.Size = new Size(80, 30);
            btnCancel.Text = "Cancel";
            btnCancel.Font = FontManager.LoadFont("tahoma", 10);
            Skins.SkinManager.LoadButtonGui(btnCancel);
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            this.AddWidget(lblAddTile);
            this.AddWidget(nudAmount);
            this.AddWidget(lblPrice);
            this.AddWidget(btnAccept);
            this.AddWidget(btnCancel);
        }
开发者ID:ChaotixBluix,项目名称:PMU-Client,代码行数:52,代码来源:mnuChangeDarkness.cs


示例8: mnuShopItemSelected

        public mnuShopItemSelected(string name, int itemNum, int itemSlot, Enums.InvMenuType transactionType)
            : base(name)
        {
            transaction = transactionType;

            base.Size = new Size(185, 125);

            base.MenuDirection = Enums.MenuDirection.Horizontal;
            if (transaction == Enums.InvMenuType.Buy) {
            base.Location = new Point(435, 40);
            } else {

                base.Location = new Point(335, 40);
            }

            itemPicker = new Widgets.MenuItemPicker("itemPicker");
            itemPicker.Location = new Point(18, 23);

            lblMove = new Label("lblMove");
            lblMove.Font = FontManager.LoadFont("PMDCP", 32);
            lblMove.AutoSize = true;
            lblMove.Text = "Store";
            lblMove.Location = new Point(30, 8);
            lblMove.HoverColor = Color.Red;
            lblMove.ForeColor = Color.WhiteSmoke;
            lblMove.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblMove_Click);

            nudAmount = new NumericUpDown("nudAmount");
            nudAmount.Size = new Size(120, 24);
            nudAmount.Location = new Point(32, 42);
            nudAmount.Font = FontManager.LoadFont("PMDCP", 16);
            nudAmount.Minimum = 1;
            nudAmount.Maximum = Int32.MaxValue;

            lblSummary = new Label("lblSummary");
            lblSummary.Font = FontManager.LoadFont("PMDCP", 32);
            lblSummary.AutoSize = true;
            lblSummary.Text = "Summary";
            lblSummary.Location = new Point(30, 58);
            lblSummary.HoverColor = Color.Red;
            lblSummary.ForeColor = Color.WhiteSmoke;
            lblSummary.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblSummary_Click);

            this.AddWidget(itemPicker);
            this.AddWidget(lblMove);
            this.AddWidget(nudAmount);
            this.AddWidget(lblSummary);

            this.ItemSlot = itemSlot;
            this.ItemNum = itemNum;
        }
开发者ID:blastboy,项目名称:Client,代码行数:51,代码来源:mnuShopItemSelected.cs


示例9: MainForm

	public MainForm ()
	{
		// 
		// _numericUpDown
		// 
		_numericUpDown = new NumericUpDown ();
		_numericUpDown.Location = new Point (8, 8);
		_numericUpDown.Value = 1;
		Controls.Add (_numericUpDown);
		// 
		// _tabControl
		// 
		_tabControl = new TabControl ();
		_tabControl.Dock = DockStyle.Bottom;
		_tabControl.Height = 280;
		Controls.Add (_tabControl);
		// 
		// _bugDescriptionText1
		// 
		_bugDescriptionText1 = new TextBox ();
		_bugDescriptionText1.Dock = DockStyle.Fill;
		_bugDescriptionText1.Multiline = true;
		_bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture,
			"Steps to execute:{0}{0}" +
			"1. Click left of the number inside the NumericUpDown " +
			"and do not release the mouse button down.{0}{0}" +
			"2. Move to the right of the number.{0}{0}" +
			"3. Release the mouse button.{0}{0}" +
			"4. Move the mouse pointer left and right over the form.{0}{0}" +
			"5. Click to the right of the number.{0}{0}" +
			"Expected result:{0}{0}" +
			"1. On step 4, the number remains highlighted.{0}{0}" +
			"2. On step 5, the number is no longer highlighted.",
			Environment.NewLine);
		// 
		// _tabPage1
		// 
		_tabPage1 = new TabPage ();
		_tabPage1.Text = "#1";
		_tabPage1.Controls.Add (_bugDescriptionText1);
		_tabControl.Controls.Add (_tabPage1);
		// 
		// MainForm
		// 
		ClientSize = new Size (500, 320);
		StartPosition = FormStartPosition.CenterScreen;
		Text = "bug #357482";
	}
开发者ID:mono,项目名称:gert,代码行数:48,代码来源:MainForm.cs


示例10: Player

        public Player(Point pntlocation, double dblBank, NumericUpDown betControl, playerType type, Strategy strategy, CountMethod method)
        {
            // Since the game is limited to one split (two hands), just set them up now
            hands = new Hand[2];
            hands[0] = new Hand(new Point(0, 0));
            hands[1] = new Hand(new Point(50, 0));

            // Player specific variables
            location = pntlocation;
            bank = dblBank;
            plyrStrategy = strategy;
            plyrMethod = method;
            plyrType = type;
            plyrBet = betControl;

            // Start out with one hand, they may split pairs to get two
            numberOfHands = 1;
        }
开发者ID:itgsod-alexander-karlsson,项目名称:Blackjack,代码行数:18,代码来源:Player.cs


示例11: UpDownExam

    public UpDownExam()
    {
        numeric = new NumericUpDown();
        numeric.Parent = this;
        numeric.SetBounds(20, 20, 100, 30);
        numeric.Minimum = -1000;
        numeric.Maximum = 9000;
        numeric.Value = 1000;
        numeric.Increment = 1000;
        numeric.ThousandsSeparator = true;
        numeric.ValueChanged += new EventHandler(numeric_ValueChanged);

        domain = new DomainUpDown();
        domain.Parent = this;
        domain.SetBounds(20, 50, 100, 30);
        for (int i = 0; i < str.Length; i++)
        {
            domain.Items.Add(str[i]);
        }
        domain.Text = "색상 선택";
        domain.SelectedItemChanged += new EventHandler(domain_SelectedItemChanged);
    }
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:22,代码来源:Program.cs


示例12: InitializeComponent

 private void InitializeComponent() {
   this.btnExec = new Button();
   this.numUpDown = new NumericUpDown();
   ((System.ComponentModel.ISupportInitialize)(this.numUpDown)).BeginInit();
   this.SuspendLayout();
   //
   // btnExec
   //
   this.btnExec.Location = new System.Drawing.Point(142, 6);
   this.btnExec.Name = "btnExec";
   this.btnExec.Size = new System.Drawing.Size(66, 20);
   this.btnExec.TabIndex = 1;
   this.btnExec.Text = "Execute";
   this.btnExec.UseVisualStyleBackColor = true;
   this.btnExec.Click += new System.EventHandler(this.btnExec_Click);
   //
   // numUpDown
   //
   this.numUpDown.Location = new System.Drawing.Point(12, 6);
   this.numUpDown.Maximum = 2;
   this.numUpDown.Minimum = -2;
   this.numUpDown.Name = "numUpDown";
   this.numUpDown.Size = new System.Drawing.Size(77, 19);
   this.numUpDown.TabIndex = 2;
   this.numUpDown.Value = 1;
   //
   // mainForm
   //
   this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
   this.AutoScaleMode = AutoScaleMode.Font;
   this.ClientSize = new System.Drawing.Size(220, 31);
   this.Controls.Add(this.numUpDown);
   this.Controls.Add(this.btnExec);
   this.Name = "mainForm";
   this.Text = "Transpose";
   ((System.ComponentModel.ISupportInitialize)(this.numUpDown)).EndInit();
   this.ResumeLayout(false);
 }
开发者ID:cadencii,项目名称:cadencii,代码行数:38,代码来源:TransposeEx.cs


示例13: SetPosTest

	public SetPosTest ()
	{
		left_pos = new NumericUpDown ();
		top_pos = new NumericUpDown ();

		tool_window = new Form ();
		tool_window.FormBorderStyle = FormBorderStyle.FixedToolWindow;
		tool_window.LocationChanged += new EventHandler (ToolWindowLocationChanged);

		Label xlabel = new Label ();
		xlabel.Text = "Left:";
		Label ylabel = new Label ();
		ylabel.Text = "Top:";

		xlabel.Width = 45;
		ylabel.Width = 45;

		xlabel.Left = 10;
		left_pos.Left = 55;
		ylabel.Left = 10;
		top_pos.Left = 55;
		ylabel.Top = left_pos.Bottom + 25;
		top_pos.Top = left_pos.Bottom + 25;

		left_pos.Minimum = top_pos.Minimum = Int32.MinValue;
		left_pos.Maximum = top_pos.Maximum = Int32.MaxValue;

		left_pos.ValueChanged += new EventHandler (LeftPosChanged);
		top_pos.ValueChanged += new EventHandler (TopPosChanged);

		Controls.Add (xlabel);
		Controls.Add (ylabel);
		Controls.Add (left_pos);
		Controls.Add (top_pos);

		tool_window.Show ();
	}
开发者ID:hitswa,项目名称:winforms,代码行数:37,代码来源:swf-setpos.cs


示例14: UpDownBasePeerOnlySupportsValuePattern

 public virtual void UpDownBasePeerOnlySupportsValuePattern()
 {
     NumericUpDown item = new NumericUpDown();
     UpDownBaseAutomationPeer<double> peer = null;
     TestAsync(
         item,
         () => peer = new UpDownBaseAutomationPeer<double>(item),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Dock), "UpDownBaseAutomationPeer should not support the Dock pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.ExpandCollapse), "UpDownBaseAutomationPeer should not support the ExpandCollapse pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Grid), "UpDownBaseAutomationPeer should not support the Grid pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.GridItem), "UpDownBaseAutomationPeer should not support the GridItem pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Invoke), "UpDownBaseAutomationPeer should not support the Dock pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.MultipleView), "UpDownBaseAutomationPeer should not support the MultipleView pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.RangeValue), "UpDownBaseAutomationPeer should not support the RangeValue pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Scroll), "UpDownBaseAutomationPeer should not support the Scroll pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.ScrollItem), "UpDownBaseAutomationPeer should not support the ScrollItem pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Selection), "UpDownBaseAutomationPeer should not support the Selection pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Table), "UpDownBaseAutomationPeer should not support the Table pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.TableItem), "UpDownBaseAutomationPeer should not support the TableItem pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Toggle), "UpDownBaseAutomationPeer should not support the Toggle pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Transform), "UpDownBaseAutomationPeer should not support the Transform pattern!"),
         () => Assert.IsNotNull(peer.GetPattern(PatternInterface.Value), "UpDownBaseAutomationPeer should support the Value pattern!"),
         () => Assert.IsNull(peer.GetPattern(PatternInterface.Window), "UpDownBaseAutomationPeer should not support the Window pattern!"));
 }
开发者ID:modulexcite,项目名称:SilverlightToolkit,代码行数:24,代码来源:UpDownBaseAutomationPeerTest.cs


示例15: mnuItemSelected

        public mnuItemSelected(string name, int itemSlot)
            : base(name)
        {
            if ((int)Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.GetInvItemNum(itemSlot)].Type < 8 || (int)Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.GetInvItemNum(itemSlot)].Type == 15) {
                //cannot use item
                base.Size = new Size(165, 165);
                maxItems = 3;
                useable = false;
            } else {
                //can use item
                base.Size = new Size(165, 195);
                maxItems = 4;
                useable = true;
            }
            base.MenuDirection = Enums.MenuDirection.Horizontal;
            base.Location = new Point(335, 40);

            itemPicker = new Widgets.MenuItemPicker("itemPicker");
            itemPicker.Location = new Point(18, 23);

            int widgetY = 8;

            //add choices
            lblHold = new Label("lblHold");
            lblHold.Size = new System.Drawing.Size(120, 32);
            lblHold.Font = FontManager.LoadFont("PMU", 32);
            //lblHold.AutoSize = true;
            lblHold.Text = "Hold";
            lblHold.Location = new Point(30, widgetY);
            lblHold.HoverColor = Color.Red;
            lblHold.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblHold_Click);
            lblHold.ForeColor = Color.WhiteSmoke;

            this.AddWidget(lblHold);
            widgetY += 30;

            if (useable) {
                lblUse = new Label("lblUse");
                lblUse.Font = FontManager.LoadFont("PMU", 32);
                lblUse.AutoSize = true;
                lblUse.Text = "Use";
                lblUse.Location = new Point(30, widgetY);
                lblUse.HoverColor = Color.Red;
                lblUse.ForeColor = Color.WhiteSmoke;
                lblUse.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblUse_Click);

                this.AddWidget(lblUse);
                widgetY += 30;
            }

            lblThrow = new Label("lblThrow");
            lblThrow.Size = new System.Drawing.Size(120, 32);
            lblThrow.Location = new Point(30, widgetY);
            lblThrow.Font = FontManager.LoadFont("PMU", 32);
            lblThrow.Text = "Throw";
            lblThrow.HoverColor = Color.Red;
            lblThrow.ForeColor = Color.WhiteSmoke;
            lblThrow.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblThrow_Click);

            widgetY += 30;

            lblSummary = new Label("lblSummary");
            lblSummary.Size = new System.Drawing.Size(120, 32);
            lblSummary.Location = new Point(30, widgetY);
            lblSummary.Font = FontManager.LoadFont("PMU", 32);
            lblSummary.Text = "Summary";
            lblSummary.HoverColor = Color.Red;
            lblSummary.ForeColor = Color.WhiteSmoke;
            lblSummary.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblSummary_Click);

            widgetY += 30;

            lblDrop = new Label("lblDrop");
            lblDrop.Font = FontManager.LoadFont("PMU", 32);
            lblDrop.Size = new System.Drawing.Size(130, 32);
            lblDrop.AutoSize = false;
            //lblDrop.Text = "Drop";
            lblDrop.Location = new Point(30, widgetY);
            lblDrop.HoverColor = Color.Red;
            lblDrop.ForeColor = Color.WhiteSmoke;
            lblDrop.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(lblDrop_Click);

            widgetY += 32;

            if (Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.GetInvItemNum(itemSlot)].Type == Enums.ItemType.Currency || Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.GetInvItemNum(itemSlot)].StackCap > 0) {
                lblDrop.Text = "Drop Amount:";
                nudAmount = new NumericUpDown("nudAmount");
                nudAmount.Size = new Size(120, 24);
                nudAmount.Location = new Point(32, widgetY);
                nudAmount.Maximum = Players.PlayerManager.MyPlayer.Inventory[itemSlot].Value;
                nudAmount.Minimum = 1;

                this.AddWidget(nudAmount);
            } else {
                lblDrop.Text = "Drop";
            }

            this.AddWidget(lblDrop);
            this.AddWidget(lblSummary);
            this.AddWidget(lblThrow);
//.........这里部分代码省略.........
开发者ID:ChaotixBluix,项目名称:PMU-Client,代码行数:101,代码来源:mnuItemSelected.cs


示例16: UnitTest

        public String Note; // additional text to display in status bar

        public UnitTest(ZGE.Components.ZComponent parent) : base(parent)
        {
            Dock = Pos.Fill;
            SetSize(1024, 768);
            m_List = new Control.CollapsibleList(this);

            LeftDock.TabControl.AddPage("Unit tests", m_List);
            LeftDock.Width = 150;

            m_TextOutput = new Control.ListBox(BottomDock);
            m_Button = BottomDock.TabControl.AddPage("Output", m_TextOutput);
            BottomDock.Height = 200;

            m_DebugCheck = new Control.LabeledCheckBox(m_List);
            m_DebugCheck.Text = "Debug outlines";
            m_DebugCheck.CheckChanged += DebugCheckChanged;

            m_StatusBar = new Control.StatusBar(this);
            m_StatusBar.Dock = Pos.Bottom;
            m_StatusBar.AddControl(m_DebugCheck, true);

            //m_Center = new Center(this);
            //m_Center.Dock = Pos.Fill;
            GUnit test;

            {
                CollapsibleCategory cat = m_List.Add("Non-Interactive");
                {
                    test = new Label(this);
                    RegisterUnitTest("Label", cat, test);
                    test = new RichLabel(this);
                    RegisterUnitTest("RichLabel", cat, test);
                    test = new GroupBox(this);
                    RegisterUnitTest("GroupBox", cat, test);
                    test = new ProgressBar(this);
                    RegisterUnitTest("ProgressBar", cat, test);
                    test = new ImagePanel(this);
                    RegisterUnitTest("ImagePanel", cat, test);
                    test = new StatusBar(this);
                    RegisterUnitTest("StatusBar", cat, test);
                }
            }

            {
                CollapsibleCategory cat = m_List.Add("Standard");
                {
                    test = new Button(this);
                    RegisterUnitTest("Button", cat, test);
                    test = new TextBox(this);
                    RegisterUnitTest("TextBox", cat, test);
                    test = new CheckBox(this);
                    RegisterUnitTest("CheckBox", cat, test);
                    test = new RadioButton(this);
                    RegisterUnitTest("RadioButton", cat, test);
                    test = new ComboBox(this);
                    RegisterUnitTest("ComboBox", cat, test);
                    test = new ListBox(this);
                    RegisterUnitTest("ListBox", cat, test);
                    test = new NumericUpDown(this);
                    RegisterUnitTest("NumericUpDown", cat, test);
                    test = new Slider(this);
                    RegisterUnitTest("Slider", cat, test);
                    test = new MenuStrip(this);
                    RegisterUnitTest("MenuStrip", cat, test);
                    test = new CrossSplitter(this);
                    RegisterUnitTest("CrossSplitter", cat, test);
                }
            }
            
            {
                CollapsibleCategory cat = m_List.Add("Containers");
                {
                    test = new Window(this);
                    RegisterUnitTest("Window", cat, test);
                    test = new TreeControl(this);
                    RegisterUnitTest("TreeControl", cat, test);
                    test = new Properties(this);
                    RegisterUnitTest("Properties", cat, test);
                    test = new TabControl(this);
                    RegisterUnitTest("TabControl", cat, test);
                    test = new ScrollControl(this);
                    RegisterUnitTest("ScrollControl", cat, test);
                    test = new Docking(this);
                    RegisterUnitTest("Docking", cat, test);
                }
            }
            
            {
                CollapsibleCategory cat = m_List.Add("Non-standard");
                {
                    test = new CollapsibleList(this);
                    RegisterUnitTest("CollapsibleList", cat, test);
                    test = new ColorPickers(this);
                    RegisterUnitTest("Color pickers", cat, test);
                }
            }

            m_StatusBar.SendToBack();
//.........这里部分代码省略.........
开发者ID:petya2164,项目名称:ZsharpGameEditor,代码行数:101,代码来源:UnitTest.cs


示例17: winShopPanel


//.........这里部分代码省略.........

            txtJoinSay = new TextBox("txtJoinSay");
            txtJoinSay.Size = new Size(420, 16);
            txtJoinSay.Location = new Point(10, 48);

            lblLeaveSay = new Label("lblLeaveSay");
            lblLeaveSay.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblLeaveSay.Text = "Leave Say:";
            lblLeaveSay.AutoSize = true;
            lblLeaveSay.Location = new Point(10, 68);

            txtLeaveSay = new TextBox("txtLeaveSay");
            txtLeaveSay.Size = new Size(420, 16);
            txtLeaveSay.Location = new Point(10, 80);

            lbxShopItems = new ListBox("lbxShopItems");
            lbxShopItems.Location = new Point(10, 100);
            lbxShopItems.Size = new Size(220, 240);
            lbxShopItems.ItemSelected += new EventHandler(lbxShopItems_ItemSelected);

            for (int i = 0; i < MaxInfo.MAX_TRADES; i++) {
                lbiShopItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": ---");

                lbxShopItems.Items.Add(lbiShopItem);
            }
            //ListBoxTextItem lbiShopItem;

            lblGiveItem = new Label("lblGiveItem");
            lblGiveItem.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblGiveItem.Text = "Item Paid [---]:";
            lblGiveItem.AutoSize = true;
            lblGiveItem.Location = new Point(240, 100);

            nudGiveItem = new NumericUpDown("nudGiveItem");
            nudGiveItem.Size = new Size(100, 16);
            nudGiveItem.Location = new Point(240, 112);
            nudGiveItem.Maximum = MaxInfo.MaxItems;
            nudGiveItem.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudGiveItem_ValueChanged);

            lblGiveAmount = new Label("lblGiveAmount");
            lblGiveAmount.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblGiveAmount.Text = "Amount Paid: (integer)";
            lblGiveAmount.AutoSize = true;
            lblGiveAmount.Location = new Point(240, 132);

            nudGiveAmount = new NumericUpDown("nudGiveAmount");
            nudGiveAmount.Size = new Size(100, 16);
            nudGiveAmount.Maximum = 2147483647;
            nudGiveAmount.Location = new Point(240, 144);

            lblGetItem = new Label("lblGetItem");
            lblGetItem.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblGetItem.Text = "Item Bought [---]:";
            lblGetItem.AutoSize = true;
            lblGetItem.Location = new Point(240, 164);

            nudGetItem = new NumericUpDown("nudGetItem");
            nudGetItem.Size = new Size(100, 16);
            nudGetItem.Location = new Point(240, 176);
            nudGetItem.Maximum = MaxInfo.MaxItems;
            nudGetItem.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudGetItem_ValueChanged);

            btnShiftUp = new Button("btnShiftUp");
            btnShiftUp.Location = new Point(240, 206);
            btnShiftUp.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnShiftUp.Size = new System.Drawing.Size(64, 16);
开发者ID:blastboy,项目名称:Client,代码行数:67,代码来源:winShopPanel.cs


示例18: winNPCPanel

        public winNPCPanel()
            : base("winNPCPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "NPC Panel";

            pnlNPCList = new Panel("pnlNPCList");
            pnlNPCList.Size = new System.Drawing.Size(200, 230);
            pnlNPCList.Location = new Point(0, 0);
            pnlNPCList.BackColor = Color.White;
            pnlNPCList.Visible = true;

            pnlNPCEditor = new Panel("pnlNPCEditor");
            pnlNPCEditor.Size = new System.Drawing.Size(300, 420);
            pnlNPCEditor.Location = new Point(0, 0);
            pnlNPCEditor.BackColor = Color.White;
            pnlNPCEditor.Visible = false;

            #region NPC Selector

            lbxNPCList = new ListBox("lbxNPCList");
            lbxNPCList.Location = new Point(10, 10);
            lbxNPCList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiNPC = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Npc.NpcHelper.Npcs[(i + 1) + 10 * currentTen].Name);
                lbxNPCList.Items.Add(lbiNPC);
            }

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            #region NPC Editor

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "NPC Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 5);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 15);
            txtName.Location = new Point(75, 5);
            txtName.Font = Graphics.FontManager.LoadFont("Tahoma", 12);
            txtName.Text = "";

            lblAttackSay = new Label("lblAttackSay");
            lblAttackSay.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblAttackSay.Text = "Attack Say:";
            lblAttackSay.AutoSize = true;
            lblAttackSay.Location = new Point(10, 25);

            txtAttackSay = new TextBox("txtAttackSay");
            txtAttackSay.Size = new System.Drawing.Size(200, 15);
            txtAttackSay.Location = new Point(75, 25);
            txtAttackSay.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);

            lblForm = new Label("lblForm");
            lblForm.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblForm.Text = "Form:";
            lblForm.AutoSize = true;
            lblForm.Location = new Point(10, 45);

            nudForm = new NumericUpDown("nudForm");
//.........这里部分代码省略.........
开发者ID:blastboy,项目名称:Client,代码行数:101,代码来源:winNPCPanel.cs


示例19: InitMapEditorWidgets


//.........这里部分代码省略.........

            picSprite2.Location = new Point(75, 130);
            picSprite2.BackColor = Color.White;
            picSprite2.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle;
            picSprite2.Visible = false;

            lstSound = new ListBox("lstSound");
            lstSound.Location = new Point(10, 60);
            lstSound.Size = new Size(180, 140);
            {
                SdlDotNet.Graphics.Font font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
                string[] sfxFiles = System.IO.Directory.GetFiles(IO.Paths.SfxPath);
                for (int i = 0; i < sfxFiles.Length; i++) {
                    lstSound.Items.Add(new ListBoxTextItem(font, System.IO.Path.GetFileName(sfxFiles[i])));
                }
            }
            lstSound.Visible = false;

            chkTake = new CheckBox("chkTake");
            chkTake.BackColor = Color.Transparent;
            chkTake.Size = new System.Drawing.Size(125, 17);
            chkTake.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8);
            chkTake.Text = "Take away key upon use";
            chkTake.Visible = false;

            chkHidden = new CheckBox("chkHidden");
            chkHidden.BackColor = Color.Transparent;
            chkHidden.Size = new System.Drawing.Size(125, 17);
            chkHidden.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8);
            chkHidden.Text = "Hidden";
            chkHidden.Visible = false;
            chkHidden.CheckChanged += new EventHandler(chkHidden_CheckChanged);

            nudStoryLevel = new NumericUpDown("nudStoryLevel");
            nudStoryLevel.Size = new Size(134, 20);
            nudStoryLevel.Font = Graphics.FontManager.LoadFont("PMU", 18);
            nudStoryLevel.Visible = false;

            optAllow = new RadioButton("optAllow");
            optAllow.Size = new Size(75, 17);
            optAllow.Location = new Point(0, 200);
            optAllow.Font = Graphics.FontManager.LoadFont("tahoma", 12);
            optAllow.Text = "Allow";
            optAllow.Visible = false;
            optAllow.CheckChanged += new EventHandler(optAllow_CheckChanged);

            optBlock = new RadioButton("optBlock");
            optBlock.Size = new Size(75, 17);
            optBlock.Location = new Point(100, 200);
            optBlock.Font = Graphics.FontManager.LoadFont("tahoma", 12);
            optBlock.Text = "Block";
            optBlock.Visible = false;
            optBlock.CheckChanged += new EventHandler(optBlock_CheckChanged);

            btnOK = new Button("btnOK");
            btnOK.Location = new Point(this.mapViewer.X / 4, Screen.Height - shortcutBar.Height - 32);
            btnOK.Size = new System.Drawing.Size(this.mapViewer.X / 2, 32);
            btnOK.Font = Graphics.FontManager.LoadFont("PMU", 18);
            btnOK.Text = "Ok";
            btnOK.Visible = false;
            btnOK.Click += new EventHandler<MouseButtonEventArgs>(btnOK_Click);
            Skins.SkinManager.LoadButtonGui(btnOK);

            /*btnBack = new Button("btnBack");
            btnBack.Location = new Point(0, Screen.Height - shortcutBar.Height - 32);
            btnBack.Size = new System.Drawing.Size(this.mapViewer.X / 2, 32);
开发者ID:ChaotixBluix,项目名称:PMU-Client,代码行数:67,代码来源:winGame.MapEditor.cs


示例20: MainWindow

        //============================================
        public MainWindow()
        {
            SKIP = Convert.ToInt32(ConfigurationManager.AppSettings["NumofSkipLines"]);
            diPlotDetectorAppChannel = new WCFComm(ref lineArray);

         

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Numerics.Complex32类代码示例发布时间:2022-05-24
下一篇:
C# NumberStyles类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap