Пример #1
0
        private void treeNavigate_Click(object sender, EventArgs e)
        {
            GlobalVar.TabSelected = treeNavigate.FocusedNode[treeNavigate.Columns[1]].ToString();
            switch (treeNavigate.FocusedNode[treeNavigate.Columns[1]].ToString())
            {
            case "Dashboard":
                if (_Dashboard == null)
                {
                    _Dashboard           = new Dashboard();
                    _Dashboard.MdiParent = this;
                }
                splashScreenManager1.ShowWaitForm();
                _Dashboard.WindowState = System.Windows.Forms.FormWindowState.Maximized;
                _Dashboard.Show();
                splashScreenManager1.CloseWaitForm();

                break;

            case "Barang":
                if (_Barang == null)
                {
                    _Barang           = new Barang();
                    _Barang.MdiParent = this;
                }
                splashScreenManager1.ShowWaitForm();
                _Barang.WindowState = System.Windows.Forms.FormWindowState.Maximized;
                _Barang.Show();
                splashScreenManager1.CloseWaitForm();

                break;

            case "Supplier":
                if (_Supplier == null)
                {
                    _Supplier           = new Supplier();
                    _Supplier.MdiParent = this;
                }
                splashScreenManager1.ShowWaitForm();
                _Supplier.WindowState = System.Windows.Forms.FormWindowState.Maximized;
                _Supplier.Show();
                splashScreenManager1.CloseWaitForm();

                break;

            case "Pelanggan":
                if (_Pelanggan == null)
                {
                    _Pelanggan           = new Pelanggan();
                    _Pelanggan.MdiParent = this;
                }
                splashScreenManager1.ShowWaitForm();
                _Pelanggan.WindowState = System.Windows.Forms.FormWindowState.Maximized;
                _Pelanggan.Show();
                splashScreenManager1.CloseWaitForm();

                break;

            case "Pembelian":
                if (_Pembelian == null)
                {
                    _Pembelian           = new Pembelian();
                    _Pembelian.MdiParent = this;
                }
                splashScreenManager1.ShowWaitForm();
                _Pembelian.WindowState = System.Windows.Forms.FormWindowState.Maximized;
                _Pembelian.Show();
                splashScreenManager1.CloseWaitForm();

                break;
            }
        }