Ejemplo n.º 1
0
        private void btnHome_Click(object sender, EventArgs e)
        {
            mainPnl.Controls.Clear();
            FoodGridPanel foodGridPanel = new FoodGridPanel(this.mainPnl);

            ChangeButtonColor(btnHome, buttons);
            foodGridPanel.User = this.User;
            this.mainPnl.Controls.Add(foodGridPanel);
        }
Ejemplo n.º 2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            this.btnUpdateUser.Text = User.Username;
            FoodGridPanel foodGridPanel = new FoodGridPanel(this.mainPnl);

            foodGridPanel.User = this.User;
            this.mainPnl.Controls.Add(foodGridPanel);
            //get all button in pnlMenu
            foreach (var component in pnlMenu.Controls)
            {
                if (component is Guna2Button)
                {
                    buttons.Add((Guna2Button)component);
                }
            }
        }