Exemple #1
0
        private void lblInventory_Click(object sender, EventArgs e)
        {
            FoodItemService foodItemService = serviceFactory.GetFoodItemService();

            ShowDetailsOfFoodMenu(foodItemService.GetFoodMenu());

            grpBxInventory.Show();
            grpProfile.Hide();
        }
Exemple #2
0
        private void lblProfile_Click(object sender, EventArgs e)
        {
            UserService userService = serviceFactory.GetUserService();

            user = userService.GetUserInfo(user);

            SetTextToProfileComponent();
            grpProfile.Show();
            grpBxInventory.Hide();
        }
Exemple #3
0
        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;

            m_PossibilitiesLabel = new Label();
            m_PossibilitiesLabel.Text = "Possible moves and score";
            m_PossibilitiesLabel.Left = 130;
            m_PossibilitiesLabel.Top = 10;
            m_PossibilitiesLabel.AutoSize = true;
            m_PossibilitiesLabel.Show();
            this.Controls.Add( m_PossibilitiesLabel );

            m_PossibilitiesList = new ListBox();
            m_PossibilitiesList.Left = 130;
            m_PossibilitiesList.Top = 30;
            m_PossibilitiesList.Width = 280;
            m_PossibilitiesList.Height = 250;
            m_PossibilitiesList.Show();
            this.Controls.Add( m_PossibilitiesList );

            m_NumberPossibilitiesLabel = new Label();
            m_NumberPossibilitiesLabel.Text = "Possibilities: 0";
            m_NumberPossibilitiesLabel.Left = 130;
            m_NumberPossibilitiesLabel.Top = 280;
            m_NumberPossibilitiesLabel.AutoSize = true;
            m_NumberPossibilitiesLabel.Show();
            this.Controls.Add( m_NumberPossibilitiesLabel );

            SyncAllSelectors();
            SyncAllSelectors();
        }
Exemple #4
0
        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();
            m_Dice2_Val4.Text = "4";
            m_Dice2_Val4.Width = 50;
            m_Dice2_Val4.Left = 20;
            m_Dice2_Val4.Top = 80;
            m_GroupBox2.Controls.Add( m_Dice2_Val4 );

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

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