当前位置: 首页>>代码示例>>C#>>正文


C# Button.Hide方法代码示例

本文整理汇总了C#中System.Windows.Forms.Button.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Button.Hide方法的具体用法?C# Button.Hide怎么用?C# Button.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.Button的用法示例。


在下文中一共展示了Button.Hide方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Form2

 public Form2()
 {
     InitializeComponent();
     hardB = new Button();
     promptL = new Label();
     easyB = new Button();
     medium = new Button();
     promptL.Text = "Please select a difficulty";
     promptL.AutoSize = true;
     promptL.Location = new Point(71, 9);
     medium.Location = new Point(94, 90);
     medium.Text = "Medium";
     medium.Click += medium_Click;
     easyB.Location = new Point(94, 55);
     easyB.Text = "Easy";
     easyB.Click += easy_Click;
     hardB.Location = new Point(94, 125);
     hardB.Text = "Hell";
     hardB.Click += hard_Click;
     this.Controls.Add(easyB);
     this.Controls.Add(promptL);
     this.Controls.Add(medium);
     this.Controls.Add(hardB);
     easyB.Hide();
     medium.Hide();
     hardB.Hide();
     promptL.Hide();
     hardB.Enabled = false;
 }
开发者ID:TheLegendaryDuke,项目名称:Checkers-3.0,代码行数:29,代码来源:Form2.cs

示例2: HideCreatePost

 public void HideCreatePost(Button btn)
 {
     if (IsLoggedIn())
     {
         btn.Text = "Create Post";
     }
     else
     {
         btn.Hide();
     }
 }
开发者ID:LukeBluett,项目名称:PostBored,代码行数:11,代码来源:Menubar.cs

示例3: TimeToggleButton

        public TimeToggleButton()
        {
            start = (Button)FindControlByName("startTimeButton");
            stop = (Button)FindControlByName("stopTimeButton");

            start.Click += start_Click;
            stop.Click += stop_Click;

            OperateOnControl(stop, _ =>
            {
                stop.Width = start.Width = (stop.Left + stop.Width) - start.Left;
                stop.Left = start.Left;
                stop.Hide();
                start.Focus();
            });
        }
开发者ID:charliesome,项目名称:nulloader,代码行数:16,代码来源:TimeToggleButton.cs

示例4: CopperMinerUpgrade

        internal void CopperMinerUpgrade(Worker miners, Button copperMinerUpgrade, Label minersLabel)
        {
            if (stocks.Wood >= miners.CopperWoodCost && stocks.Stone >= miners.CopperStoneCost && stocks.Copper >= miners.CopperCopperCost)
            {
                miners.IsCopper = true;

                helper.UpdateStocks(miners.CopperWoodCost, "wood");
                helper.UpdateStocks(miners.CopperStoneCost, "stone");
                helper.UpdateStocks(miners.CopperCopperCost, "copper");

                minersLabel.Text = "Copper\nMiners";

                copperMinerUpgrade.Hide();

                helper.ActionDisplay("buy", "copper miner", true);
            }
        }
开发者ID:Orthak,项目名称:QuestForAKingdom,代码行数:17,代码来源:Shop.cs

示例5: IronMinerUpgrade

        internal void IronMinerUpgrade(Worker miners, Button ironMinerUpgrade, Label minersLabel)
        {
            if (stocks.Wood >= miners.IronWoodCost &&
                stocks.Stone >= miners.IronStoneCost &&
                stocks.Copper >= miners.IronCopperCost &&
                stocks.Iron >= miners.IronIronCost)
            {
                miners.IsIron = true;

                helper.UpdateStocks(miners.IronWoodCost, "wood");
                helper.UpdateStocks(miners.IronStoneCost, "stone");
                helper.UpdateStocks(miners.IronCopperCost, "copper");
                helper.UpdateStocks(miners.IronIronCost, "iron");

                minersLabel.Text = "Iron\nMiners";

                ironMinerUpgrade.Hide();

                helper.ActionDisplay("buy", "iron miner", true);
            }
        }
开发者ID:Orthak,项目名称:QuestForAKingdom,代码行数:21,代码来源:Shop.cs

示例6: FontDialog


//.........这里部分代码省略.........
			applyButton.TabIndex = 5;
			applyButton.Text = "Apply";
			// helpButton
			helpButton.FlatStyle = FlatStyle.System;
			helpButton.Location = new Point( 352, 104 );
			helpButton.Size = new Size( 70, 23 );
			helpButton.TabIndex = 6;
			helpButton.Text = "Help";
			// underlinedCheckBox
			underlinedCheckBox.FlatStyle = FlatStyle.System;
			underlinedCheckBox.Location = new Point( 8, 36 );
			underlinedCheckBox.TabIndex = 1;
			underlinedCheckBox.Text = "Underlined";
			// fontstyleTextBox
			fontstyleTextBox.Location = new Point( 164, 26 );
			fontstyleTextBox.Size = new Size( 112, 21 );
			fontstyleTextBox.TabIndex = 6;
			fontstyleTextBox.Text = "";
			// scriptLabel
			scriptLabel.Location = new Point( 164, 236 );
			scriptLabel.Size = new Size( 100, 16 );
			scriptLabel.TabIndex = 13;
			scriptLabel.Text = "Script:";
			// examplePanel
			examplePanel.Location = new Point( 8, 20 );
			examplePanel.TabIndex = 0;
			examplePanel.Size = new Size( 156, 40 );
			examplePanel.BorderStyle = BorderStyle.Fixed3D;
			
			form.AcceptButton = okButton;
			form.CancelButton = cancelButton;
			
			form.Controls.Add( scriptComboBox );
			form.Controls.Add( scriptLabel );
			form.Controls.Add( exampleGroupBox );
			form.Controls.Add( effectsGroupBox );
			form.Controls.Add( fontsizeListBox );
			form.Controls.Add( fontstyleListBox );
			form.Controls.Add( fontListBox );
			form.Controls.Add( fontsizeTextBox );
			form.Controls.Add( fontstyleTextBox );
			form.Controls.Add( fontTextBox );
			form.Controls.Add( cancelButton );
			form.Controls.Add( okButton );
			form.Controls.Add( sizeLabel );
			form.Controls.Add( fontstyleLabel );
			form.Controls.Add( fontLabel );
			form.Controls.Add( applyButton );
			form.Controls.Add( helpButton );
			
			exampleGroupBox.ResumeLayout( false );
			effectsGroupBox.ResumeLayout( false );
			
			form.Size = new Size( 430, 318 );
			
			form.FormBorderStyle = FormBorderStyle.FixedDialog;
			form.MaximizeBox = false;
			
			form.Text = "Font";
			
			form.ResumeLayout( false );
			
			scriptComboBox.BeginUpdate ();
			scriptComboBox.Items.AddRange (char_sets_names);
			scriptComboBox.SelectedIndex = 0;
			scriptComboBox.EndUpdate ();
			
			applyButton.Hide( );
			helpButton.Hide( );
			colorComboBox.Hide( );
			
			cancelButton.Click += new EventHandler( OnClickCancelButton );
			okButton.Click += new EventHandler( OnClickOkButton );
			applyButton.Click += new EventHandler (OnApplyButton);
			examplePanel.Paint += new PaintEventHandler( OnPaintExamplePanel );
			fontListBox.SelectedIndexChanged += new EventHandler( OnSelectedIndexChangedFontListBox );
			fontsizeListBox.SelectedIndexChanged += new EventHandler( OnSelectedIndexChangedSizeListBox );
			fontstyleListBox.SelectedIndexChanged += new EventHandler( OnSelectedIndexChangedFontStyleListBox );
			underlinedCheckBox.CheckedChanged += new EventHandler( OnCheckedChangedUnderlinedCheckBox );
			strikethroughCheckBox.CheckedChanged += new EventHandler( OnCheckedChangedStrikethroughCheckBox );
			scriptComboBox.SelectedIndexChanged += new EventHandler (OnSelectedIndexChangedScriptComboBox);
			
			fontTextBox.KeyPress += new KeyPressEventHandler (OnFontTextBoxKeyPress);
			fontstyleTextBox.KeyPress += new KeyPressEventHandler (OnFontStyleTextBoxKeyPress);
			fontsizeTextBox.KeyPress += new KeyPressEventHandler (OnFontSizeTextBoxKeyPress);
			
			fontTextBox.TextChanged += new EventHandler (OnFontTextBoxTextChanged);
			fontstyleTextBox.TextChanged += new EventHandler (OnFontStyleTextTextChanged);
			fontsizeTextBox.TextChanged += new EventHandler (OnFontSizeTextBoxTextChanged);
			
			fontTextBox.KeyDown += new KeyEventHandler (OnFontTextBoxKeyDown);
			fontstyleTextBox.KeyDown += new KeyEventHandler (OnFontStyleTextBoxKeyDown);
			fontsizeTextBox.KeyDown += new KeyEventHandler (OnFontSizeTextBoxKeyDown);
			
			fontTextBox.MouseWheel += new MouseEventHandler (OnFontTextBoxMouseWheel);
			fontstyleTextBox.MouseWheel += new MouseEventHandler (OnFontStyleTextBoxMouseWheel);
			fontsizeTextBox.MouseWheel += new MouseEventHandler (OnFontSizeTextBoxMouseWheel);
			
			PopulateFontList ();
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:101,代码来源:FontDialog.cs

示例7: ColorDialog


//.........这里部分代码省略.........
			briLabel.FlatStyle = FlatStyle.System;
			briLabel.Location = new Point (287, 250);
			briLabel.Size = new Size (36, 16);
			briLabel.TabIndex = 24;
			briLabel.Text = Locale.GetText ("Bri") + ":";
			briLabel.TextAlign = ContentAlignment.MiddleRight;
			
			// defineColoursButton
			defineColoursButton.FlatStyle = FlatStyle.System;
			defineColoursButton.Location = new Point (5, 244);
			defineColoursButton.Size = new Size (210, 22);
			defineColoursButton.TabIndex = 6;
			// FIXME: update resource files
			defineColoursButton.Text = "Define Custom Colors >>";
			//defineColoursButton.Text = Locale.GetText ("Define Custom Colors >>");
			// okButton
			okButton.FlatStyle = FlatStyle.System;
			okButton.Location = new Point (5, 271);
			okButton.Size = new Size (66, 22);
			okButton.TabIndex = 0;
			okButton.Text = Locale.GetText ("OK");
			// cancelButton
			cancelButton.FlatStyle = FlatStyle.System;
			cancelButton.Location = new Point (78, 271);
			cancelButton.Size = new Size (66, 22);
			cancelButton.TabIndex = 1;
			cancelButton.Text = Locale.GetText ("Cancel");
			// helpButton
			helpButton.FlatStyle = FlatStyle.System;
			helpButton.Location = new Point (149, 271);
			helpButton.Size = new Size (66, 22);
			helpButton.TabIndex = 5;
			helpButton.Text = Locale.GetText ("Help");
			helpButton.Hide ();
			
			// addColoursButton
			addColoursButton.FlatStyle = FlatStyle.System;
			addColoursButton.Location = new Point (227, 271);
			addColoursButton.Size = new Size (213, 22);
			addColoursButton.TabIndex = 7;
			// FIXME: update resource files
			addColoursButton.Text =  "Add To Custom Colors";
			//addColoursButton.Text =  Locale.GetText ("Add To Custom Colors");
			
			// baseColorControl
			baseColorControl.Location = new Point (3, 6);
			baseColorControl.Size = new Size (212, 231);
			baseColorControl.TabIndex = 13;
			// colorMatrixControl
			colorMatrixControl.Location = new Point (227, 7);
			colorMatrixControl.Size = new Size (179, 190);
			colorMatrixControl.TabIndex = 14;
			// triangleControl
			triangleControl.Location = new Point (432, 0);
			triangleControl.Size = new Size (16, 204);
			triangleControl.TabIndex = 12;
			// brightnessControl
			brightnessControl.Location = new Point (415, 7);
			brightnessControl.Size = new Size (14, 190);
			brightnessControl.TabIndex = 20;
			
			// selectedColorPanel
			selectedColorPanel.BackColor = SystemColors.Desktop;
			selectedColorPanel.BorderStyle = BorderStyle.Fixed3D;
			selectedColorPanel.Location = new Point (227, 202);
			selectedColorPanel.Size = new Size (60, 42);
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:67,代码来源:ColorDialog.cs

示例8: EsconderButton

 private void EsconderButton(Button btn)
 {
     btn.Hide();
 }
开发者ID:mikemajesty,项目名称:petshopv1,代码行数:4,代码来源:frmCadastrarProduto.cs

示例9: mainWindow

        public mainWindow(Intersection modelIntersection, SimulationEnvironment simulation)
        {
            InitializeComponent();
            this.simulation = simulation;
            this.model = modelIntersection;

            //Main Menus
            mainMenu = new MainMenu();
            this.Menu = mainMenu;

            //File Menu
            myMenuItemFile = new MenuItem("&File");
            simRunMenuItem = new MenuItem("&Run/Stop Simulation");
            saveFileMenuItem = new MenuItem("&Save File");
            openFileMenuItem = new MenuItem("&Open File");
            saveMySQLMenuItem = new MenuItem("&Save MySQL");
            openMySQLMenuItem = new MenuItem("&Open MySQL");
            exitMenuItem = new MenuItem("&Exit");
            mainMenu.MenuItems.Add(myMenuItemFile);
            myMenuItemFile.MenuItems.Add(simRunMenuItem);
            myMenuItemFile.MenuItems.Add(saveFileMenuItem);
            myMenuItemFile.MenuItems.Add(openFileMenuItem);
            myMenuItemFile.MenuItems.Add(saveMySQLMenuItem);
            myMenuItemFile.MenuItems.Add(openMySQLMenuItem);
            myMenuItemFile.MenuItems.Add(exitMenuItem);

            //Settings Menu
            myMenuItemSettings = new MenuItem("&Settings");
            setHLanesMenuItem = new MenuItem("&Set No. Horizontal Lanes");
            setVLanesMenuItem = new MenuItem("&Set No. Vertical Lanes");
            setHProbMenuItem = new MenuItem("&Set Horizontal Lane Car Regularity");
            setVProbMenuItem = new MenuItem("&Set Vertical Lane Car Regularity");
            setHSpeedMenuItem = new MenuItem("&Set Road Speed Horizontal");
            setVSpeedMenuItem = new MenuItem("&Set Road Speed Vertical");
            setTurnRightMenuItem = new MenuItem("&Set Turning Probability Right");
            setTurnLeftMenuItem = new MenuItem("&Set Turning Probability Left");
            setBreakdownMenuItem = new MenuItem("&Set Breakdown Probability");
            setLightCycleMenuItem = new MenuItem("&Set Light Cycle Times");
            setRHD = new MenuItem("&Set RHD");
            setLHD = new MenuItem("&Set LHD");
            mainMenu.MenuItems.Add(myMenuItemSettings);
            myMenuItemSettings.MenuItems.Add(setRHD);
            myMenuItemSettings.MenuItems.Add(setLHD);
            myMenuItemSettings.MenuItems.Add(setHLanesMenuItem);
            myMenuItemSettings.MenuItems.Add(setVLanesMenuItem);
            myMenuItemSettings.MenuItems.Add(setHProbMenuItem);
            myMenuItemSettings.MenuItems.Add(setVProbMenuItem);
            myMenuItemSettings.MenuItems.Add(setVSpeedMenuItem);
            myMenuItemSettings.MenuItems.Add(setHSpeedMenuItem);
            myMenuItemSettings.MenuItems.Add(setTurnRightMenuItem);
            myMenuItemSettings.MenuItems.Add(setTurnLeftMenuItem);
            myMenuItemSettings.MenuItems.Add(setBreakdownMenuItem);
            myMenuItemSettings.MenuItems.Add(setLightCycleMenuItem);
            setLHD.Visible = false;
            //Control Buttons
            runSimulationButton = new Button();
            runSimulationButton.Text = "Run";
            runSimulationButton.BackColor = Color.White;
            stopSimulationButton = new Button();
            stopSimulationButton.Text = "Pause";
            stopSimulationButton.BackColor = Color.White;
            resetSimulationButton = new Button();
            resetSimulationButton.Text = "Reset";
            resetSimulationButton.BackColor = Color.White;

            runSimulationButton.Location = new Point(200, 530);
            stopSimulationButton.Location = new Point(200, 530);
            resetSimulationButton.Location = new Point(450, 530);
            stopSimulationButton.Hide();
            resetSimulationButton.Hide();

            Controls.Add(runSimulationButton);
            Controls.Add(stopSimulationButton);
            Controls.Add(resetSimulationButton);

            //Event Handlers
            saveFileMenuItem.Click += new System.EventHandler(OnClickSave);
            openFileMenuItem.Click += new System.EventHandler(OnClickOpen);
            saveMySQLMenuItem.Click += new System.EventHandler(OnClickSaveDB);
            openMySQLMenuItem.Click += new System.EventHandler(OnClickOpenDB);
            setRHD.Click +=new EventHandler(OnClickSetRHD);
            setLHD.Click +=new EventHandler(OnClickSetLHD);
            exitMenuItem.Click += new System.EventHandler(OnClickExit);
            setHLanesMenuItem.Click += new System.EventHandler(OnClickHLanes);
            setVLanesMenuItem.Click += new System.EventHandler(OnClickVLanes);
            simRunMenuItem.Click += new System.EventHandler(simulationToggle);
            runSimulationButton.Click += new System.EventHandler(simulationToggle);
            stopSimulationButton.Click += new System.EventHandler(simulationToggle);
            resetSimulationButton.Click += new EventHandler(resetSimulation);
            setHProbMenuItem.Click += new EventHandler(settingsHProbListener);
            setVProbMenuItem.Click += new EventHandler(settingsVProbListener);
            setHSpeedMenuItem.Click += new EventHandler(setHSpeedMenuItem_Click);
            setVSpeedMenuItem.Click += new EventHandler(setVSpeedMenuItem_Click);
            setTurnRightMenuItem.Click += new EventHandler(setTurnRightMenuItem_Click);
            setTurnLeftMenuItem.Click += new EventHandler(setTurnLeftMenuItem_Click);
            setBreakdownMenuItem.Click += new EventHandler(setBreakdownMenuItem_Click);
            setLightCycleMenuItem.Click += new EventHandler(setLightCycleMenuItem_Click);
        }
开发者ID:heizhai,项目名称:cp2013team7,代码行数:98,代码来源:mainWindow.cs

示例10: RemoveZoom

		protected void RemoveZoom(ref Button btn)
		{
			if (btn != null)
			{
				btn.Hide();
				btn.Dispose();
				btn = null;    // reset zoom window
			}
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:9,代码来源:DisplayUnicodeNamesForm.cs

示例11: PurchaseStocksUpgrade

        internal void PurchaseStocksUpgrade(Button stocksUpgrade, Label stocksLevel, Label rationsLabel)
        {
            // Do we have the funds?
            if (stocks.Wood >= stocks.WoodUpgradeCost &&
                stocks.Stone >= stocks.StoneUpgradeCost &&
                stocks.Copper >= stocks.CopperUpgradeCost &&
                stocks.Iron >= stocks.IronUpgradeCost)
            {
                // Update the stock cap, and the stock upgrade text
                stocks.StockCap *= 2;
                stocks.RationsCap *= 2;

                stocksLevel.Text = helper.StockUpgradeTitle(stocks.UpgradeLevel) + "(Cap-" + stocks.StockCap + ")";
                rationsLabel.Text = "/" + stocks.RationsCap;

                // Subtract the nessessary funds
                helper.UpdateStocks(stocks.WoodUpgradeCost, "wood");
                helper.UpdateStocks(stocks.StoneUpgradeCost, "stone");
                helper.UpdateStocks(stocks.CopperUpgradeCost, "copper");
                helper.UpdateStocks(stocks.IronUpgradeCost, "iron");

                // Update the cost for the next purchase
                stocks.WoodUpgradeCost = helper.RoundIt(stocks.WoodUpgradeCost, "*", 2f);
                stocks.StoneUpgradeCost = helper.RoundIt(stocks.StoneUpgradeCost, "*", 2f);
                stocks.CopperUpgradeCost = helper.RoundIt(stocks.CopperUpgradeCost, "*", 2f);
                stocks.IronUpgradeCost = helper.RoundIt(stocks.IronUpgradeCost, "*", 2f);

                // Update the button text
                stocksUpgrade.Text = "Stocks Upgrade\nWood-" + stocks.WoodUpgradeCost +
                    " Stone-" + stocks.StoneUpgradeCost +
                    " Copper-" + stocks.CopperUpgradeCost +
                    " Iron-" + stocks.IronUpgradeCost;

                if (stocks.UpgradeLevel == 3)
                {
                    stocksUpgrade.Hide();
                }
                stocks.UpgradeLevel++;

                helper.ActionDisplay("buy", "stocks", true);
            }
        }
开发者ID:Orthak,项目名称:QuestForAKingdom,代码行数:42,代码来源:Shop.cs


注:本文中的System.Windows.Forms.Button.Hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。