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


C# GroupBox.Show方法代码示例

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


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

示例1: AgentGUI

        public AgentGUI( string caption )
        {
            m_Id = ++m_IdCounter;
            RadioGroupUpdater[] tmpOld = m_UpdaterList;
            m_UpdaterList = new RadioGroupUpdater[m_Id];
            if ( tmpOld != null )
                for ( int i = 0; i < tmpOld.Length; i++ )
                    m_UpdaterList[i] = tmpOld[i];
            m_UpdaterList[m_Id-1] = new RadioGroupUpdater( SyncPlayerSelectors );

            this.Text = caption;
            this.Width = 430;
            this.Height = 340;
            this.MaximizeBox = false;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;

            m_GroupBoxPlayer = new GroupBox();
            m_GroupBoxPlayer.Text = "Play as";
            m_GroupBoxPlayer.Width = 100;
            m_GroupBoxPlayer.Height = 150;
            m_GroupBoxPlayer.Left = 10;
            m_GroupBoxPlayer.Top = 25;
            m_GroupBoxPlayer.Show();
            this.Controls.Add( m_GroupBoxPlayer );

            m_PlayerLight = new RadioButton();
            m_PlayerLight.Text = "Light";
            m_PlayerLight.Width = 50;
            m_PlayerLight.Left = 25;
            m_PlayerLight.Top = 50;
            m_PlayerLight.Checked = true;
            m_PlayerLight.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerLight.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerLight );

            m_PlayerDark = new RadioButton();
            m_PlayerDark.Text = "Dark";
            m_PlayerDark.Width = 50;
            m_PlayerDark.Left = 25;
            m_PlayerDark.Top = 80;
            m_PlayerDark.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerDark.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerDark );

            m_PlayerNone = new RadioButton();
            m_PlayerNone.Text = "None";
            m_PlayerNone.Width = 50;
            m_PlayerNone.Left = 25;
            m_PlayerNone.Top = 20;
            m_PlayerNone.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerNone.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerNone );

            m_PlayerBoth = new RadioButton();
            m_PlayerBoth.Text = "Both";
            m_PlayerBoth.Width = 50;
            m_PlayerBoth.Left = 25;
            m_PlayerBoth.Top = 110;
            m_PlayerBoth.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerBoth.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerBoth );

            m_EvaluatorLabel = new Label();
            m_EvaluatorLabel.Text = "Evaluator";
            m_EvaluatorLabel.Left = 10;
            m_EvaluatorLabel.Top = 190;
            m_EvaluatorLabel.AutoSize = true;
            m_EvaluatorLabel.Show();
            this.Controls.Add( m_EvaluatorLabel );

            m_PluginSelector = new ComboBox();
            m_PluginSelector.DropDownStyle = ComboBoxStyle.DropDownList;
            m_PluginSelector.Left = 10;
            m_PluginSelector.Top = 210;
            m_PluginSelector.Width = 100;
            m_PluginSelector.Items.Add( "None" );
            m_PluginSelector.SelectedIndex = 0;
            m_PluginSelector.Show();
            this.Controls.Add( m_PluginSelector );

            m_LearnPanel = new Panel();
            m_LearnPanel.BorderStyle = BorderStyle.None;
            m_LearnPanel.Left = 5;
            m_LearnPanel.Top = 240;
            m_LearnPanel.Width = 100;
            m_LearnPanel.Height = 25;
            m_LearnPanel.Show();
            this.Controls.Add( m_LearnPanel );

            m_Learn = new CheckBox();
            m_Learn.Text = "Learn";
            m_Learn.Left = 5;
            m_Learn.Top = 0;
            m_Learn.Checked = false;
            m_Learn.CheckedChanged += new EventHandler( m_Learn_CheckedChanged );
            m_Learn.Show();
            m_LearnPanel.Controls.Add( m_Learn );
            if (m_Id == 1)
                m_Learn.Checked = true;

//.........这里部分代码省略.........
开发者ID:prezz,项目名称:Fuzzy-Gammon,代码行数:101,代码来源:AgentGUI.cs

示例2: DiceEditor

        private DiceEditor()
        {
            this.Text = "Set Dice Roll";
            this.Width = 234;
            this.Height = 250;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.StartPosition = FormStartPosition.CenterParent;
            this.MinimizeBox = false;
            this.MaximizeBox = false;

            m_GroupBox1 = new GroupBox();
            m_GroupBox1.Text = "Dice 1 value";
            m_GroupBox1.Width = 90;
            m_GroupBox1.Height = 160;
            m_GroupBox1.Left = 20;
            m_GroupBox1.Top = 10;
            m_GroupBox1.Show();
            this.Controls.Add( m_GroupBox1 );

            m_GroupBox2 = new GroupBox();
            m_GroupBox2.Text = "Dice 2 value";
            m_GroupBox2.Width = 90;
            m_GroupBox2.Height = 160;
            m_GroupBox2.Left = 120;
            m_GroupBox2.Top = 10;
            m_GroupBox2.Show();
            this.Controls.Add( m_GroupBox2 );

            m_SetValue = new Button();
            m_SetValue.Text = "Roll";
            m_SetValue.Left = 76;
            m_SetValue.Top = 182;
            m_SetValue.Click += new EventHandler( m_SetValue_Click );
            this.Controls.Add( m_SetValue );

            m_Dice1_Val1 = new RadioButton();
            m_Dice1_Val1.Text = "1";
            m_Dice1_Val1.Width = 50;
            m_Dice1_Val1.Left = 20;
            m_Dice1_Val1.Top = 20;
            m_GroupBox1.Controls.Add( m_Dice1_Val1 );

            m_Dice1_Val2 = new RadioButton();
            m_Dice1_Val2.Text = "2";
            m_Dice1_Val2.Width = 50;
            m_Dice1_Val2.Left = 20;
            m_Dice1_Val2.Top = 40;
            m_GroupBox1.Controls.Add( m_Dice1_Val2 );

            m_Dice1_Val3 = new RadioButton();
            m_Dice1_Val3.Text = "3";
            m_Dice1_Val3.Width = 50;
            m_Dice1_Val3.Left = 20;
            m_Dice1_Val3.Top = 60;
            m_GroupBox1.Controls.Add( m_Dice1_Val3 );

            m_Dice1_Val4 = new RadioButton();
            m_Dice1_Val4.Text = "4";
            m_Dice1_Val4.Width = 50;
            m_Dice1_Val4.Left = 20;
            m_Dice1_Val4.Top = 80;
            m_GroupBox1.Controls.Add( m_Dice1_Val4 );

            m_Dice1_Val5 = new RadioButton();
            m_Dice1_Val5.Text = "5";
            m_Dice1_Val5.Width = 50;
            m_Dice1_Val5.Left = 20;
            m_Dice1_Val5.Top = 100;
            m_GroupBox1.Controls.Add( m_Dice1_Val5 );

            m_Dice1_Val6 = new RadioButton();
            m_Dice1_Val6.Text = "6";
            m_Dice1_Val6.Width = 50;
            m_Dice1_Val6.Left = 20;
            m_Dice1_Val6.Top = 120;
            m_Dice1_Val6.Checked = true;
            m_GroupBox1.Controls.Add( m_Dice1_Val6 );

            m_Dice2_Val1 = new RadioButton();
            m_Dice2_Val1.Text = "1";
            m_Dice2_Val1.Width = 50;
            m_Dice2_Val1.Left = 20;
            m_Dice2_Val1.Top = 20;
            m_GroupBox2.Controls.Add( m_Dice2_Val1 );

            m_Dice2_Val2 = new RadioButton();
            m_Dice2_Val2.Text = "2";
            m_Dice2_Val2.Width = 50;
            m_Dice2_Val2.Left = 20;
            m_Dice2_Val2.Top = 40;
            m_GroupBox2.Controls.Add( m_Dice2_Val2 );

            m_Dice2_Val3 = new RadioButton();
            m_Dice2_Val3.Text = "3";
            m_Dice2_Val3.Width = 50;
            m_Dice2_Val3.Left = 20;
            m_Dice2_Val3.Top = 60;
            m_GroupBox2.Controls.Add( m_Dice2_Val3 );

            m_Dice2_Val4 = new RadioButton();
//.........这里部分代码省略.........
开发者ID:prezz,项目名称:Fuzzy-Gammon,代码行数:101,代码来源:DiceEditor.cs


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