public void ShowForm(int index = 0)
 {
     if (index == 10)
     {
         LogInForm2 form = (LogInForm2)dictForm["loginForm2"];
         form.Show();
         form.Activate();
     }
 }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            StaffManagement staffManagementForm = new StaffManagement();

            staffManagementForm.MdiParent = this;
            dictForm.Add("staffManagementForm", staffManagementForm);
            //staffManagementForm.Dock = DockStyle.Fill;

            TransactionStock trStockForm = new TransactionStock();

            trStockForm.MdiParent = this;
            dictForm.Add("transactionStockForm", trStockForm);
            //trStockForm.Dock = DockStyle.Fill;

            WarehouseManagement warehouseManagementForm = new WarehouseManagement();

            warehouseManagementForm.MdiParent = this;
            dictForm.Add("warehouseManagementForm", warehouseManagementForm);
            //warehouseManagementForm.Dock = DockStyle.Fill;

            ResourceQuoteForm rscQuoteForm = new ResourceQuoteForm();

            rscQuoteForm.MdiParent = this;
            dictForm.Add("resourceQuoteForm", rscQuoteForm);
            //rscQuoteForm.Dock = DockStyle.Fill;

            LogInForm1 loginForm = new LogInForm1();

            loginForm.MdiParent = this;
            dictForm.Add("loginForm", loginForm);
            //loginForm.Dock = DockStyle.Fill;

            MaterialOrderManagement materialOrderForm = new MaterialOrderManagement();

            materialOrderForm.MdiParent = this;
            dictForm.Add("materialOrderForm", materialOrderForm);
            //materialOrderForm.Dock = DockStyle.Fill;

            loginForm.Width  = 900;
            loginForm.Height = 600;
            //loginForm.Dock = DockStyle.Fill;

            LogInForm2 login2Form = new LogInForm2();

            login2Form.MdiParent = this;
            dictForm.Add("loginForm2", login2Form);
            //login2Form.Dock = DockStyle.Fill;

            loginForm.Show();

            tabControl1.SelectedIndex = -1; // 어떤 탭도 선택되지 않은 상태를 의미한다
        }
Beispiel #3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            LogInForm1 loginForm = new LogInForm1();

            loginForm.MdiParent = this;
            dictForm.Add("loginForm", loginForm);

            //loginForm.Width = 900;
            //loginForm.Height = 600;

            LogInForm2 login2Form = new LogInForm2();

            login2Form.MdiParent = this;
            dictForm.Add("loginForm2", login2Form);

            loginForm.Show();
        }
Beispiel #4
0
        public void ShowForm(int index = 0)
        {
            /*
             * for (int i = 0; i < dictForm.Count; i++)
             * {
             *  Form[] forms = this.MdiChildren;
             *  foreach (var item in forms)
             *  {
             *      ((Form)item).Hide();
             *  }
             * }*/

            if (index == 10)
            {
                LogInForm2 form = (LogInForm2)dictForm["loginForm2"];
                form.Show();
                form.Activate();
            }
        }
Beispiel #5
0
        private void MainForm_Load(object sender, EventArgs e)
        {
#if DEBUG
            loginState = true;
            ShowChildForm(new ProductSalesForm());
#else
            LogInForm1 loginForm = new LogInForm1();
            loginForm.MdiParent = this;
            dictForm.Add("loginForm", loginForm);

            //loginForm.Width = 900;
            //loginForm.Height = 600;

            LogInForm2 login2Form = new LogInForm2();
            login2Form.MdiParent = this;
            dictForm.Add("loginForm2", login2Form);

            loginForm.Show();
#endif
        }