示例#1
0
        private void showSetting(object sender, EventArgs e)
        {
            mainPanelGlobal.Controls.Clear();
            //   Panel mainPanel = createPanel.CreateMainPanel(mainFormGlobal, 0, 0, width, height, BorderStyle.None, Color.Transparent);

            Button buttonObj  = (Button)sender;
            string buttonName = buttonObj.Name;

            switch (buttonName)
            {
            case "menuButton_0_1":
                SoldoutSetting1 soldSetting = new SoldoutSetting1(mainFormGlobal, mainPanelGlobal);
                soldSetting.TopLevel = false;
                mainPanelGlobal.Controls.Add(soldSetting);
                soldSetting.FormBorderStyle = FormBorderStyle.None;
                soldSetting.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                soldSetting.Show();
                break;

            case "menuButton_0_2":
                ClosingProcess closingProcess = new ClosingProcess(mainFormGlobal, mainPanelGlobal);
                closingProcess.TopLevel = false;
                mainPanelGlobal.Controls.Add(closingProcess);
                closingProcess.FormBorderStyle = FormBorderStyle.None;
                closingProcess.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                closingProcess.Show();
                break;

            case "menuButton_0_3":
                mainFormGlobal.topPanelGlobal.Hide();
                mainFormGlobal.bottomPanelGlobal.Hide();
                mainFormGlobal.mainPanelGlobal.Hide();
                mainFormGlobal.mainPanelGlobal_2.Show();
                FalsePurchaseCancellation falsePurchaseCancellation = new FalsePurchaseCancellation(mainFormGlobal, mainPanelGlobal);
                falsePurchaseCancellation.TopLevel = false;
                mainPanelGlobal_2.Controls.Add(falsePurchaseCancellation);
                falsePurchaseCancellation.FormBorderStyle = FormBorderStyle.None;
                falsePurchaseCancellation.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                falsePurchaseCancellation.Show();
                break;

            case "menuButton_1_1":
                ProductItemManagement productItemManagement = new ProductItemManagement(mainFormGlobal, mainPanelGlobal);
                productItemManagement.TopLevel = false;
                mainPanelGlobal.Controls.Add(productItemManagement);
                productItemManagement.FormBorderStyle = FormBorderStyle.None;
                productItemManagement.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                productItemManagement.Show();
                break;

            case "menuButton_1_2":
                CategoryList categoryList = new CategoryList(mainFormGlobal, mainPanelGlobal);
                categoryList.TopLevel = false;
                mainPanelGlobal.Controls.Add(categoryList);
                categoryList.FormBorderStyle = FormBorderStyle.None;
                categoryList.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                categoryList.Show();
                break;

            case "menuButton_1_3":
                GroupList groupList = new GroupList(mainFormGlobal, mainPanelGlobal);
                groupList.TopLevel = false;
                mainPanelGlobal.Controls.Add(groupList);
                groupList.FormBorderStyle = FormBorderStyle.None;
                groupList.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                groupList.Show();
                break;

            case "menuButton_2_1":
                TimeSetting timeSetting = new TimeSetting(mainFormGlobal, mainPanelGlobal);
                timeSetting.TopLevel = false;
                mainPanelGlobal.Controls.Add(timeSetting);
                //timeSetting.Owner =
                timeSetting.FormBorderStyle = FormBorderStyle.None;
                timeSetting.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                timeSetting.Show();
                break;

            case "menuButton_2_2":
                PasswordSetting passwordSetting = new PasswordSetting(mainFormGlobal, mainPanelGlobal);
                passwordSetting.TopLevel = false;
                mainPanelGlobal.Controls.Add(passwordSetting);
                //timeSetting.Owner =
                passwordSetting.FormBorderStyle = FormBorderStyle.None;
                passwordSetting.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                passwordSetting.Show();
                break;

            case "menuButton_2_3":
                OpenTimeChange openTimeChange = new OpenTimeChange(mainFormGlobal, mainPanelGlobal);
                openTimeChange.TopLevel = false;
                mainPanelGlobal.Controls.Add(openTimeChange);
                //timeSetting.Owner =
                openTimeChange.FormBorderStyle = FormBorderStyle.None;
                openTimeChange.Dock            = DockStyle.Fill;
                Thread.Sleep(200);
                openTimeChange.Show();
                break;
            }
        }
示例#2
0
 public void initOpenTimeChange(OpenTimeChange sendHandler)
 {
     openTimeChange = sendHandler;
 }