예제 #1
0
        private void Inventory_Click(object sender, EventArgs e)
        {
            DrinkButton.Visible = true;
            FoodButton.Visible  = true;
            Inventory.Visible   = false;
            _obj = this;
            if (FoodPage.Instance.panel2.Controls.ContainsKey("UserControl3"))
            {
                panel2.Controls["UserControl3"].SendToBack();
            }
            else
            {
                panel2.Controls["UserControl4"].SendToBack();
            }
            UserControl8 uc = new UserControl8();

            uc.Dock = DockStyle.Fill;
            panel2.Controls.Add(uc);
            panel2.Controls["UserControl8"].BringToFront();

            if (FoodPage.Instance.panel3.Controls.ContainsKey("UserControl6"))
            {
                panel3.Controls["UserControl6"].SendToBack();
            }
            else
            {
                panel3.Controls["UserControl5"].SendToBack();
            }
            UserControl7 uc1 = new UserControl7();

            uc1.Dock = DockStyle.Fill;
            panel3.Controls.Add(uc1);
            panel3.Controls["UserControl7"].BringToFront();
        }
예제 #2
0
        private void UserControl8_Load(object sender, EventArgs e)
        {
            button1.Visible = false;
            _obj            = this;

            ShowItems uc = new ShowItems();

            uc.Dock = DockStyle.Fill;
            panel1.Controls.Add(uc);
        }
예제 #3
0
        private void AddEmployee_Click(object sender, EventArgs e)
        {
            EmployeeButton.Visible = true;
            AdminButton.Visible    = true;
            Inventory.Visible      = false;
            _obj = this;

            if (Form4.Instance.panel2.Controls.ContainsKey("UserControl2"))
            {
                panel2.Controls["UserControl2"].SendToBack();
            }
            else
            {
                panel2.Controls["UserControl1"].SendToBack();
            }
            UserControl8 uc = new UserControl8();

            uc.Dock = DockStyle.Fill;
            panel2.Controls.Add(uc);
            panel2.Controls["UserControl8"].BringToFront();
        }
예제 #4
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            button1.Visible = true;
            button2.Visible = false;
            button3.Visible = true;
            _obj            = this;

            if (UserControl8.Instance.panel1.Controls.ContainsKey("ShowItems"))
            {
                panel1.Controls["ShowItems"].SendToBack();
            }
            else
            {
                panel1.Controls["GenerateReport"].SendToBack();
            }
            AddItems uc = new AddItems();

            uc.Dock = DockStyle.Fill;
            panel1.Controls.Add(uc);
            panel1.Controls["AddItems"].BringToFront();
        }