public C1DockingTabPage AddNewTab(Form frm, String label)
        {
            //foreach (Control y in tC1.Controls)
            //{
            //    if (y is C1DockingTabPage)
            //    {
            //        if (y.Text.Equals("Import JOB"))
            //        {
            //            if (label.Equals("Import JOB"))
            //            {
            //                tC1.SelectedTab = (C1DockingTabPage)y;
            //                return null;
            //            }
            //        }
            //    }
            //}
            C1DockingTabPage tab = new C1DockingTabPage();

            tab.SuspendLayout();
            frm.TopLevel = false;
            tab.Width    = tCC1.Width - 10;
            tab.Height   = tCC1.Height - 35;

            frm.Parent = tab;
            frm.Dock   = DockStyle.Fill;
            frm.Width  = tab.Width;
            frm.Height = tab.Height;
            tab.Text   = label;
            //foreach (Control x in frm.Controls)
            //{
            //    if (x is DataGridView)
            //    {
            //        //x.Dock = DockStyle.Fill;
            //    }
            //}
            //tab.BackColor = System.Drawing.ColorTranslator.FromHtml("#1E1E1E");
            frm.Visible = true;

            tC1.TabPages.Add(tab);

            //frm.Location = new Point((tab.Width - frm.Width) / 2, (tab.Height - frm.Height) / 2);
            frm.Location = new Point(0, 0);
            tab.ResumeLayout();
            tab.Refresh();
            tab.Text = label;
            if (bc.iniC.statusAppDonor.Equals("1"))
            {
                theme1.SetTheme(tC1, bc.iniC.themeDonor);
            }
            else
            {
                theme1.SetTheme(tC1, "Office2007Blue");
            }
            tC1.SelectedTab = tab;
            //theme1.SetTheme(tC1, "Office2010Blue");
            //theme1.SetTheme(tC1, "Office2010Green");
            return(tab);
        }
Exemple #2
0
        private void initConfig()
        {
            pageLoad = true;
            fEdit    = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Regular);
            fEditB   = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Bold);
            lgrfPkg  = new List <C1FlexGrid>();

            //C1ThemeController.ApplicationTheme = ic.iniC.themeApplication;
            theme1.Theme = ic.iniC.themeApplication;
            theme1.SetTheme(sB, "BeigeOne");
            cboStkSubName.SelectedIndexChanged += CboStkSubName_SelectedIndexChanged;

            ic.ivfDB.stknDB.setCboStockSubName(cboStkSubName);
            cboStkSubName.SelectedIndex = 0;
            tC1       = new C1DockingTab();
            tabOnhand = new C1DockingTabPage();
            tC1.SuspendLayout();
            tabOnhand.SuspendLayout();

            tC1.Dock              = System.Windows.Forms.DockStyle.Fill;
            tC1.HotTrack          = true;
            tC1.BorderStyle       = System.Windows.Forms.BorderStyle.FixedSingle;
            tC1.TabSizeMode       = C1.Win.C1Command.TabSizeModeEnum.Fit;
            tC1.TabsShowFocusCues = true;
            tC1.Alignment         = TabAlignment.Top;
            tC1.SelectedTabBold   = true;
            tC1.Name              = "tC1";
            tC1.CanCloseTabs      = true;
            tabOnhand.Name        = "tabOnhand";
            tabOnhand.TabIndex    = 0;
            tabOnhand.Text        = "Onhand";
            theme1.SetTheme(tC1, ic.theme);
            //theme1.SetTheme(groupBox1, theme2);

            tC1.ResumeLayout(false);
            tabOnhand.ResumeLayout(false);
            tC1.PerformLayout();
            tabOnhand.PerformLayout();

            tC1.Controls.Add(tabOnhand);
            pnStock.Controls.Add(tC1);
            initGrfStk();

            sB1.Text = "";
            pageLoad = false;
        }
        public C1DockingTabPage AddNewTab(Form frm, String label)
        {
            frm.FormBorderStyle = FormBorderStyle.None;
            C1DockingTabPage tab = new C1DockingTabPage();

            tab.SuspendLayout();
            frm.TopLevel = false;
            tab.Width    = tC1.Width - 10;
            tab.Height   = tC1.Height - 35;
            tab.Name     = frm.Name;

            frm.Parent   = tab;
            frm.Dock     = DockStyle.Fill;
            frm.Width    = tab.Width;
            frm.Height   = tab.Height;
            tab.Text     = label;
            tab.TabIndex = tC1.TabCount + 1;

            //foreach (Control x in frm.Controls)
            //{
            //    if (x is DataGridView)
            //    {
            //        //x.Dock = DockStyle.Fill;
            //    }
            //}
            //tab.BackColor = System.Drawing.ColorTranslator.FromHtml("#1E1E1E");
            frm.Visible = true;

            //tC1.TabPages.Add(tab);
            tC1.TabPages.Insert(tC1.TabCount, tab);
            //frm.Location = new Point((tab.Width - frm.Width) / 2, (tab.Height - frm.Height) / 2);
            frm.Location = new Point(0, 0);
            tab.ResumeLayout();
            tab.Refresh();
            tab.Text     = label;
            tab.Closing += Tab_Closing;

            theme1.SetTheme(tC1, bc.iniC.themeApplication);

            tC1.SelectedTab = tab;
            //theme1.SetTheme(tC1, "Office2010Blue");
            //theme1.SetTheme(tC1, "Office2010Green");
            return(tab);
        }
        private void initComponent()
        {
            //new LogWriter("d", "FrmDoctorView initComponent 00 ");
            int  gapLine = 20, gapX = 20;
            Size size = new Size();
            int  scrW = Screen.PrimaryScreen.Bounds.Width;

            theme1   = new C1.Win.C1Themes.C1ThemeController();
            this.sb1 = new C1.Win.C1Ribbon.C1StatusBar();
            panel1   = new System.Windows.Forms.Panel();
            pnHead   = new System.Windows.Forms.Panel();
            pnBotton = new System.Windows.Forms.Panel();
            pnQue    = new System.Windows.Forms.Panel();
            pnApm    = new System.Windows.Forms.Panel();
            pnFinish = new System.Windows.Forms.Panel();
            pnIPD    = new System.Windows.Forms.Panel();

            //theme1 = new C1.Win.C1Themes.C1ThemeController();
            tC1       = new C1.Win.C1Command.C1DockingTab();
            tabQue    = new C1.Win.C1Command.C1DockingTabPage();
            tabApm    = new C1.Win.C1Command.C1DockingTabPage();
            tabFinish = new C1.Win.C1Command.C1DockingTabPage();
            tabIPD    = new C1.Win.C1Command.C1DockingTabPage();

            panel1.SuspendLayout();
            pnHead.SuspendLayout();
            pnBotton.SuspendLayout();
            pnQue.SuspendLayout();
            pnApm.SuspendLayout();
            pnFinish.SuspendLayout();
            pnIPD.SuspendLayout();
            tC1.SuspendLayout();
            tabQue.SuspendLayout();
            tabApm.SuspendLayout();
            tabFinish.SuspendLayout();
            tabIPD.SuspendLayout();

            this.SuspendLayout();

            this.panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.panel1.Location = new System.Drawing.Point(0, 0);
            this.panel1.Name     = "panel1";
            this.panel1.TabIndex = 0;
            //panel1.BackColor = Color.Brown;
            this.sb1.AutoSizeElement = C1.Framework.AutoSizeElement.Width;
            this.sb1.Location        = new System.Drawing.Point(0, 620);
            this.sb1.Name            = "sb1";
            this.sb1.Size            = new System.Drawing.Size(956, 22);
            this.sb1.VisualStyle     = C1.Win.C1Ribbon.VisualStyle.Office2007Blue;
            pnHead.Size        = new System.Drawing.Size(scrW, 50);
            pnHead.BorderStyle = BorderStyle.Fixed3D;

            tabQue.Name     = "tabQue";
            tabQue.TabIndex = 0;
            tabQue.Text     = "Queue";
            tabQue.Font     = fEditB;
            //tabQue.TabIndex = tC1.TabCount + 1;

            tabApm.Name     = "tabApm";
            tabApm.TabIndex = 1;
            tabApm.Text     = "Appointment";
            tabApm.Font     = fEditB;

            tabFinish.Name     = "tabFinish";
            tabFinish.TabIndex = 2;
            tabFinish.Text     = "Finish";
            tabFinish.Font     = fEditB;

            tabIPD.Name     = "tabIPD";
            tabIPD.TabIndex = 3;
            tabIPD.Text     = "IPD";
            tabIPD.Font     = fEditB;

            tC1.Dock              = System.Windows.Forms.DockStyle.Fill;
            tC1.HotTrack          = true;
            tC1.BorderStyle       = System.Windows.Forms.BorderStyle.FixedSingle;
            tC1.TabSizeMode       = C1.Win.C1Command.TabSizeModeEnum.Fit;
            tC1.TabsShowFocusCues = true;
            tC1.Alignment         = TabAlignment.Top;
            tC1.SelectedTabBold   = true;
            tC1.Name              = "tC1";
            tC1.Font              = fEditB;
            tC1.CanCloseTabs      = true;
            tC1.CanAutoHide       = false;
            tC1.SelectedTabBold   = true;
            //tC1.Location = new System.Drawing.Point(0, 0);
            //tC1.BackColor = Color.White;

            pnHead.Dock          = DockStyle.Top;
            pnBotton.Dock        = DockStyle.Fill;
            pnBotton.BorderStyle = BorderStyle.FixedSingle;
            pnQue.Dock           = DockStyle.Fill;
            pnApm.Dock           = DockStyle.Fill;
            pnFinish.Dock        = DockStyle.Fill;
            pnIPD.Dock           = DockStyle.Fill;
            //new LogWriter("d", "FrmDoctorView initComponent 01 ");
            setControlComponent();

            this.Controls.Add(panel1);
            this.Controls.Add(this.sb1);

            panel1.Controls.Add(pnBotton);
            panel1.Controls.Add(pnHead);
            pnBotton.Controls.Add(tC1);
            tC1.Controls.Add(tabQue);
            tC1.Controls.Add(tabApm);
            tC1.Controls.Add(tabFinish);
            tC1.Controls.Add(tabIPD);
            tabQue.Controls.Add(pnQue);
            tabApm.Controls.Add(pnApm);
            tabFinish.Controls.Add(pnFinish);
            tabIPD.Controls.Add(pnIPD);

            pnHead.Controls.Add(lbDtrName);
            pnHead.Controls.Add(txtPttHn);
            pnHead.Controls.Add(btnHnSearch);
            pnHead.Controls.Add(txtDate);
            pnHead.Controls.Add(lbTxtDate);
            pnHead.Controls.Add(lbTxtPttHn);
            //pnHead.Controls.Add(lbPttName);

            this.WindowState = FormWindowState.Maximized;

            //lbDtrName.ResumeLayout(false);
            //lbTxtPttHn.ResumeLayout(false);
            panel1.ResumeLayout(false);
            pnHead.ResumeLayout(false);
            pnBotton.ResumeLayout(false);
            pnQue.ResumeLayout(false);
            pnApm.ResumeLayout(false);
            pnFinish.ResumeLayout(false);
            pnIPD.ResumeLayout(false);
            tC1.ResumeLayout(false);
            tabQue.ResumeLayout(false);
            tabApm.ResumeLayout(false);
            tabFinish.ResumeLayout(false);
            tabIPD.ResumeLayout(false);
            this.ResumeLayout(false);

            pnQue.PerformLayout();
            pnApm.PerformLayout();

            tC1.PerformLayout();
            tabQue.PerformLayout();
            tabApm.PerformLayout();
            this.PerformLayout();
        }
        private void InitComponent()
        {
            int  gapY = 30, gapX = 20, gapLine = 5, gapColName = 70;
            Size size = new Size();

            theme1       = new C1ThemeController();
            theme1.Theme = ic.iniC.themeApplication;
            pnTop        = new Panel();
            pnTop.Dock   = DockStyle.Top;
            pnTop.Size   = new Size(20, 60);
            pnBody       = new Panel();
            pnBody.Dock  = DockStyle.Fill;
            pnTop.SuspendLayout();
            pnBody.SuspendLayout();
            this.SuspendLayout();

            lbYear                     = new Label();
            lbYear.Text                = "Year :";
            lbYear.Font                = fEdit;
            lbYear.Location            = new System.Drawing.Point(gapX, gapLine);
            lbYear.AutoSize            = true;
            lbYear.Name                = "lbYear";
            size                       = ic.MeasureString(lbYear);
            cboYear                    = new C1ComboBox();
            cboYear.AllowSpinLoop      = false;
            cboYear.BorderStyle        = System.Windows.Forms.BorderStyle.FixedSingle;
            cboYear.Font               = fEdit;
            cboYear.GapHeight          = 0;
            cboYear.ImagePadding       = new System.Windows.Forms.Padding(0);
            cboYear.ItemsDisplayMember = "";
            cboYear.ItemsValueMember   = "";
            cboYear.Location           = new System.Drawing.Point(size.Width + 20, lbYear.Location.Y);
            cboYear.Name               = "cboYear";
            cboYear.Size               = new System.Drawing.Size(184, 20);
            cboYear.TabIndex           = 562;
            cboYear.Tag                = null;
            theme1.SetTheme(cboYear, "(default)");
            cboYear.VisualStyle          = C1.Win.C1Input.VisualStyle.Office2007Blue;
            cboYear.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            cboYear.Location             = new Point(gapColName, lbYear.Location.Y);

            btnNew          = new C1Button();
            btnNew.Name     = "btnNew";
            btnNew.Text     = "New 2019";
            btnNew.Font     = this.fEdit;
            size            = ic.MeasureString(btnNew);
            btnNew.Size     = new Size(100, 40);
            btnNew.Location = new Point(cboYear.Location.X + cboYear.Width + 40, lbYear.Location.Y);
            btnNew.Click   += BtnNew_Click;

            btnSave          = new C1Button();
            btnSave.Name     = "btnSave";
            btnSave.Text     = "Save 2019";
            btnSave.Font     = this.fEdit;
            size             = ic.MeasureString(btnSave);
            btnSave.Size     = new Size(100, 40);
            btnSave.Location = new Point(btnNew.Location.X + btnNew.Width + 40, lbYear.Location.Y);
            btnSave.Click   += BtnSave_Click;

            tC1                   = new C1DockingTab();
            tC1.Dock              = System.Windows.Forms.DockStyle.Fill;
            tC1.HotTrack          = true;
            tC1.BorderStyle       = System.Windows.Forms.BorderStyle.FixedSingle;
            tC1.TabSizeMode       = C1.Win.C1Command.TabSizeModeEnum.Fit;
            tC1.TabsShowFocusCues = true;
            tC1.Alignment         = TabAlignment.Top;
            tC1.SelectedTabBold   = true;
            tC1.Name              = "tC1";
            tC1.CanCloseTabs      = true;

            tab2019 = new C1DockingTabPage();
            tC1.SuspendLayout();
            tab2019.SuspendLayout();

            tab2019.Name     = "tabOnhand";
            tab2019.TabIndex = 0;
            tab2019.Text     = "Onhand";
            theme1.SetTheme(tC1, ic.theme);

            pnTop.Controls.Add(lbYear);
            pnTop.Controls.Add(cboYear);
            pnTop.Controls.Add(lbStkSubName);
            //pnTop.Controls.Add(cboStkSubName);
            pnTop.Controls.Add(btnNew);
            pnTop.Controls.Add(btnSave);
            this.Controls.Add(pnBody);
            this.Controls.Add(pnTop);
            tC1.Controls.Add(tab2019);
            pnBody.Controls.Add(tC1);
            theme1.SetTheme(pnBody, ic.iniC.themeApp);
            theme1.SetTheme(pnTop, "Office2010Red");

            pnTop.ResumeLayout(false);
            pnBody.ResumeLayout(false);
            tC1.ResumeLayout(false);
            tab2019.ResumeLayout(false);
            this.ResumeLayout(false);
            pnBody.PerformLayout();
            pnTop.PerformLayout();
            tC1.PerformLayout();
            tab2019.PerformLayout();
            this.PerformLayout();
        }