Exemple #1
0
        private void initGrfDept()
        {
            grfDept          = new C1FlexGrid();
            grfDept.Font     = fEdit;
            grfDept.Dock     = System.Windows.Forms.DockStyle.Fill;
            grfDept.Location = new System.Drawing.Point(0, 0);

            FilterRow fr = new FilterRow(grfDept);

            grfDept.AfterRowColChange += new C1.Win.C1FlexGrid.RangeEventHandler(this.grfDept_AfterRowColChange);
            grfDept.CellButtonClick   += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellButtonClick);
            grfDept.CellChanged       += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged);

            panel2.Controls.Add(this.grfDept);

            C1Theme theme = C1ThemeController.GetThemeByName("Office2013Red", false);

            C1ThemeController.ApplyThemeToObject(grfDept, theme);
        }
Exemple #2
0
        private void initConfig()
        {
            fEdit  = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Bold);

            theme       = new C1ThemeController();
            theme.Theme = C1ThemeController.ApplicationTheme;
            //theme.SetTheme(sB, "BeigeOne");
            //foreach (Control c in panel2.Controls)
            //{
            //    theme1.SetTheme(c, "Office2013Red");
            //}
            imgStart = Resources.accept_database24;
            stt      = new C1SuperTooltip();
            sep      = new C1SuperErrorProvider();

            cust = new Customer();
            initGrfReq();
        }
Exemple #3
0
        private void initGrfCr()
        {
            grfCr          = new C1FlexGrid();
            grfCr.Font     = fEdit;
            grfCr.Dock     = System.Windows.Forms.DockStyle.Fill;
            grfCr.Location = new System.Drawing.Point(0, 0);

            //FilterRow fr = new FilterRow(grfPosi);

            grfCr.AfterRowColChange += GrfCr_AfterRowColChange;
            //grfAgn.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfPosi_CellButtonClick);
            //grfAgn.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfPosi_CellChanged);

            pnCredit.Controls.Add(this.grfCr);

            C1Theme theme = C1ThemeController.GetThemeByName("Office2013Red", false);

            C1ThemeController.ApplyThemeToObject(grfCa, theme);
        }
Exemple #4
0
        private void ribbonStyleCombo_ChangeCommitted(object sender, EventArgs e)
        {
            this.SuspendPainting();
            C1Theme theme = null;

            try
            {
                theme = C1ThemeController.GetThemeByName(ribbonStyleCombo.Text, false);
            }
            catch
            {
            }
            if (theme != null)
            {
                C1ThemeController.ApplyThemeToControlTree(this, theme);
            }
            this.ResumePainting();
            this.Activate();
        }
        private void initControl()
        {
            this.Width           = 250;
            this.Height          = 120;
            this.MinimizeBox     = false;
            this.MaximizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;

            label1       = new System.Windows.Forms.Label();
            txtPassword  = new C1.Win.C1Input.C1TextBox();
            theme1       = new C1.Win.C1Themes.C1ThemeController();
            theme1.Theme = "Office2013Red";

            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;

            label1.AutoSize  = true;
            label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            label1.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222)));
            label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            label1.Location  = new System.Drawing.Point(10, 20);
            //label1.Size = new System.Drawing.Size(68, 16);
            label1.TabIndex = 0;
            label1.Text     = "รหัสผ่าน :";

            txtPassword.BorderStyle       = System.Windows.Forms.BorderStyle.FixedSingle;
            txtPassword.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152)))));
            txtPassword.Font         = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222)));
            txtPassword.Location     = new System.Drawing.Point(80, 20);
            txtPassword.Name         = "txtContFNameE";
            txtPassword.Size         = new System.Drawing.Size(100, 20);
            txtPassword.TabIndex     = 84;
            txtPassword.Tag          = null;
            txtPassword.PasswordChar = '*';
            txtPassword.KeyUp       += new KeyEventHandler(this.txtPassword_KeyUp);
            theme1.SetTheme(this.txtPassword, "(default)");


            this.StartPosition = FormStartPosition.CenterParent;

            this.Controls.Add(label1);
            this.Controls.Add(txtPassword);
        }
        private void initConfig()
        {
            fEdits  = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize - 3, FontStyle.Regular);
            fEdit   = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Regular);
            fEditB  = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Bold);
            fEdit3B = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize + 3, FontStyle.Bold);
            fEdit5B = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize + 5, FontStyle.Bold);
            fPrnBil = new Font(bc.iniC.pdfFontName, bc.pdfFontSize, FontStyle.Regular);
            famtB   = new Font(bc.iniC.pdfFontName, bc.pdfFontSize + 7, FontStyle.Bold);
            theme1  = new C1.Win.C1Themes.C1ThemeController();
            pn      = new Panel();

            initCompoment();
            setControl();


            this.Load             += FrmVaccineApprove_Load;
            this.FormClosing      += FrmVaccineApprove_FormClosing;
            grfSelect.DoubleClick += GrfSelect_DoubleClick;
        }
Exemple #7
0
        private void initConfig()
        {
            theme1 = new C1ThemeController();
            theme1.SetTheme(sB, "BeigeOne");
            fEdit  = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Bold);
            //color = ColorTranslator.FromHtml(ic.iniC.grfRowColor);
            tC1.TabClick += TC1_TabClick;
            int timerlab = 0;

            int.TryParse(bc.iniC.timerImgScanNew, out timerlab);
            timer          = new Timer();
            timer.Interval = timerlab * 1000;
            timer.Tick    += Timer_Tick;
            timer.Enabled  = true;

            initGrfReq();
            initGrfProc();
            setGrfReq();
        }
Exemple #8
0
        // ** ctor
        public OptionsForm()
        {
            // initialize component
            InitializeComponent();
            //
            AutoScaleMode = AutoScaleMode.None;
            Font          = MainForm.DefaultAppFont;

            if (IntPtr.Size == 4)
            {
                _chkWarn_AppIn64bitMode.Visible = false;
            }

            // Populate static option lists:

            // Grid units:
            this._cmbGridUnits.Items.Clear();
            this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsAuto);
            this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsEnglish);
            this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsMetric);
            this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsCustom);
            // Data isolation level:
            _cmbIsolationLevel.Items.Clear();
            IsolationLevel[] values = (IsolationLevel[])Enum.GetValues(typeof(IsolationLevel));
            for (int i = 0; i < values.Length; i++)
            {
                _cmbIsolationLevel.Items.Add(values[i]);
            }
            // Themes:
            _cmbThemeBuiltIn.Items.AddRange(C1ThemeController.GetThemes());
            _cmbThemeCustom.Items.AddRange(C1ThemeLocator.GetAvailableThemes(C1ThemeLocator.LocationType.ThemesFolder).ToArray());
            if (_cmbThemeCustom.Items.Count == 0)
            {
                _cmbThemeCustom.Enabled = false;
                _rbtThemeCustom.Enabled = false;
            }
            //
            _chkReload_CheckedChanged(_chkReload, EventArgs.Empty);
            //
            _btnResetLayout.Enabled = MainForm.TheMainForm.ReportDesignMode;
        }
Exemple #9
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);
            deposit      = new Deposit();
            dwithdraw    = new DepositWithDraw();
            ptt          = new Patient();
            vs           = new Visit();
            theme1       = new C1ThemeController();
            theme1.Theme = ic.iniC.themeApplication;
            stt          = new C1SuperTooltip();
            sep          = new C1SuperErrorProvider();

            initCompoment();
            ic.ivfDB.oPkgDB.setCboPackage(cboPackage, "");
            ic.ivfDB.oPkgDB.setCboPackage(cboPackageHn, "");
            txtDepositDate.Value = DateTime.Now.ToString("yyyy-MM-dd");

            this.Load                  += FrmDeport_Load;
            btnSave.Click              += BtnSave_Click;
            grfDeposit.DoubleClick     += GrfDeposit_DoubleClick;
            btnWithDrawSave.Click      += BtnWithDrawSave_Click;
            btnNew.Click               += BtnNew_Click;
            txtHn.KeyUp                += TxtHn_KeyUp;
            btnSearch.Click            += BtnSearch_Click;
            grfDepositHn.DoubleClick   += GrfDepositHn_DoubleClick;
            txtDeposit.KeyPress        += TxtDeposit_KeyPress;
            txtName.KeyPress           += TxtName_KeyPress;
            cboPackage.DropDownClosed  += CboPackage_DropDownClosed;
            txtWithDrawAmount.KeyPress += TxtWithDrawAmount_KeyPress;

            setControl();
            if (pttid.Length > 0)
            {
                chkAll.Checked = false;
            }
            setGrfDeposit(pttid, grfDeposit);
            setGrfDeposit(pttid, grfDepositHn);
            pageLoad = false;
        }
Exemple #10
0
        private void initGrfMatr()
        {
            grfMatd          = new C1FlexGrid();
            grfMatd.Font     = fEdit;
            grfMatd.Dock     = System.Windows.Forms.DockStyle.Fill;
            grfMatd.Location = new System.Drawing.Point(0, 0);

            //FilterRow fr = new FilterRow(grfPosi);

            //grfMatr.AfterRowColChange += new C1.Win.C1FlexGrid.RangeEventHandler(this.grfPosi_AfterRowColChange);
            //grfMatr.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfPosi_CellButtonClick);
            grfMatd.DoubleClick += GrfMatd_DoubleClick;

            panel2.Controls.Add(this.grfMatd);

            //setControl();

            C1Theme theme = C1ThemeController.GetThemeByName("Office2013Red", false);

            C1ThemeController.ApplyThemeToObject(grfMatd, theme);
        }
Exemple #11
0
 public bool SaveLayoutDialog(out string filePath)
 {
     filePath = null;
     using (var dialog = new SaveLayoutForm())
     {
         if (Theme != null)
         {
             C1ThemeController.ApplyThemeToControlTree(dialog, C1ThemeController.GetThemeByName(Theme, false));
         }
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             if (!Directory.Exists(_layoutsDir))
             {
                 Directory.CreateDirectory(_layoutsDir);
             }
             filePath = _layoutsDir + @"\" + dialog.FileName + ".xml";
             return(true);
         }
     }
     return(false);
 }
Exemple #12
0
        private void initConfig()
        {
            pageLoad = true;
            fEdit    = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Regular);
            fEditB   = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Bold);
            fEdit3B  = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize + 3, FontStyle.Bold);
            fEdit5B  = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize + 5, FontStyle.Bold);
            theme1   = new C1.Win.C1Themes.C1ThemeController();
            sep      = new C1SuperErrorProvider();
            stt      = new C1SuperTooltip();
            initCompoment();
            setControl();
            this.Load      += FrmReceptionCovidSend_Load;
            btnPrint.Click += BtnPrint_Click;
            cboDocGrp.SelectedIndexChanged += CboDocGrp_SelectedIndexChanged;
            txtHn.KeyUp           += TxtHn_KeyUp;
            grfSelect.DoubleClick += GrfSelect_DoubleClick;
            btnDeleteAll.Click    += BtnDeleteAll_Click;
            btnGet.Click          += BtnGet_Click;

            pageLoad = false;
        }
Exemple #13
0
        private void initGrfStockDrug()
        {
            grfDrug          = new C1FlexGrid();
            grfDrug.Font     = fEdit;
            grfDrug.Dock     = System.Windows.Forms.DockStyle.Fill;
            grfDrug.Location = new System.Drawing.Point(0, 0);

            //FilterRow fr = new FilterRow(grfPosi);

            grfDrug.AfterRowColChange += GrfPkg_AfterRowColChange;
            //grfAgn.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfPosi_CellButtonClick);
            //grfAgn.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfPosi_CellChanged);

            panel1.Controls.Add(this.grfDrug);
            FilterRow fr = new FilterRow(grfDrug);

            grfDrug.AllowFiltering = true;
            grfDrug.AfterFilter   += GrfDrug_AfterFilter;
            C1Theme theme = C1ThemeController.GetThemeByName("Office2013Red", false);

            C1ThemeController.ApplyThemeToObject(grfDrug, theme);
        }
Exemple #14
0
        public void Init(FlexDesignerHostServices provider, ReportParameterValues parameterValues)
        {
            Debug.Assert(parameterValues != null);

            _provider = provider;
            C1FlexReport anotherReport;

            GetReportParameterValuesEnviroment(parameterValues, out _scriptNamePrefix, out anotherReport);
            _report = parameterValues.Report;

            _updating = true;

            _valueEditor = new ValueEditor(c1FlexGrid1);
            _valueEditor.Init(provider, _report.DataSourceName, "");
            C1ThemeController.ApplyThemeToControlTree(_valueEditor, MainForm.TheMainForm.CachedTheme);
            _nameEditor = new NameEditor(c1FlexGrid1);
            _nameEditor.Init(provider, anotherReport);
            C1ThemeController.ApplyThemeToControlTree(_nameEditor, MainForm.TheMainForm.CachedTheme);

            var labelIndex = c1FlexGrid1.Cols.Fixed;
            var valueIndex = labelIndex + 1;

            foreach (var item in parameterValues)
            {
                var row = c1FlexGrid1.Rows.Add();
                row[labelIndex] = ScriptValueHelper.ToString(item.Name);
                row[valueIndex] = ScriptValueHelper.ToString(item.Value);
            }

            c1FlexGrid1.Col = labelIndex;
            if (parameterValues.Count > 0)
            {
                c1FlexGrid1.Row = c1FlexGrid1.Rows.Fixed;
            }

            UpdateButtonsSatus();

            _updating = false;
        }
        private void initConfig()
        {
            try
            {
                InitializeComponent();
                this.Size     = new System.Drawing.Size(1224, 768);
                fEdit         = new Font(bqc.iniC.grdQueTodayFontName, bqc.grdQueTodayFontSize, FontStyle.Regular);
                fEditPrintQue = new Font(bqc.iniC.printerQueueFontName, int.Parse(bqc.iniC.printerQueueFontSize), FontStyle.Regular);
                theme1        = new C1ThemeController();
                tque          = new TQueue();
                comp          = new Company();

                this.Text            = "Run-time Controls";
                this.FormBorderStyle = FormBorderStyle.FixedDialog;
                this.StartPosition   = FormStartPosition.CenterParent;
                //this.StartPosition = FormStartPosition.CenterParent;

                timer          = new Timer();
                timer.Interval = bqc.timerImgScanNew;
                timer.Enabled  = false;
                timer.Tick    += Timer_Tick;

                comp = bqc.bquDB.compDB.selectByCode1("000");
                initGrfQueToday();
                setGrfQueToday();
                theme1.SetTheme(pn1, bqc.iniC.themeApplication);
                theme1.SetTheme(sB1, bqc.iniC.themeApplication);
                //this.ResumeLayout(false);
                //this.PerformLayout();

                this.StartPosition = FormStartPosition.CenterScreen;
                btnStatus.Click   += BtnStatus_Click;
            }
            catch (Exception ex)
            {
                new LogWriter("e", "FrmQueueDate initConfig err " + ex.Message);
            }
        }
Exemple #16
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // Create another form to show that changing ApplicationTheme automatically
            // propagages to all form in an application on which there is a C1ThemeController:
            var f2 = new Form2();

            f2.SetDesktopLocation(this.DesktopBounds.Right + 10, this.DesktopBounds.Top);
            f2.Show();

            //
            ctdbgThemes_Resize(null, EventArgs.Empty);

            // Get the list of available themes and populate the grid with them:
            ctdbgThemes.SetDataBinding();
            string[] themes = C1ThemeController.GetThemes();
            foreach (string s in themes)
            {
                ctdbgThemes.AddRow(s);
            }

            //
            tbApplicationTheme.Value = C1ThemeController.ApplicationTheme;
        }
Exemple #17
0
        private void initConfig()
        {
            fEdit   = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Regular);
            fEditB  = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize, FontStyle.Bold);
            fEdit5B = new Font(bc.iniC.grdViewFontName, bc.grdViewFontSize + 5, FontStyle.Bold);

            theme1       = new C1ThemeController();
            theme1.Theme = C1ThemeController.ApplicationTheme;

            btnLoad.Click  += BtnLoad_Click;
            btnClear.Click += BtnClear_Click;

            lbLoading           = new Label();
            lbLoading.Font      = fEdit5B;
            lbLoading.BackColor = Color.WhiteSmoke;
            lbLoading.ForeColor = Color.Black;
            lbLoading.AutoSize  = false;
            lbLoading.Size      = new Size(300, 60);
            lbLoading.Text      = "กรุณารอซักครู่...";
            this.Controls.Add(lbLoading);

            initGrfCheckup();
        }
Exemple #18
0
        private void EnsureEditorAdded(int selectedIndex)
        {
            switch (selectedIndex)
            {
            case 0:
                if (dtpWebColors.Controls.IndexOf(_webColorsEditor) < 0)
                {
                    dtpWebColors.Controls.Add(_webColorsEditor);
                    C1ThemeController.ApplyThemeToControlTree(_webColorsEditor, MainForm.TheMainForm.CachedTheme);
                }
                break;

            case 1:
                if (dtpSystemColors.Controls.IndexOf(_systemColorsEditor) < 0)
                {
                    dtpSystemColors.Controls.Add(_systemColorsEditor);
                    C1ThemeController.ApplyThemeToControlTree(_systemColorsEditor, MainForm.TheMainForm.CachedTheme);
                }
                break;

            case 2:
                if (dtpCustom.Controls.IndexOf(_customColorEditor) < 0)
                {
                    dtpCustom.Controls.Add(_customColorEditor);
                    C1ThemeController.ApplyThemeToControlTree(_customColorEditor, MainForm.TheMainForm.CachedTheme);
                }
                break;

            case 3:
                if (dtpGradient.Controls.IndexOf(_gradientEditor) < 0)
                {
                    dtpGradient.Controls.Add(_gradientEditor);
                    C1ThemeController.ApplyThemeToControlTree(_gradientEditor, MainForm.TheMainForm.CachedTheme);
                }
                break;
            }
        }
        private void initConfig()
        {
            pageLoad = true;
            fEdit    = new Font(bqc.iniC.grdQueFontName, bqc.grdQueFontSize, FontStyle.Regular);
            fEditB   = new Font(bqc.iniC.grdQueFontName, bqc.grdQueFontSize, FontStyle.Bold);
            theme1   = new C1ThemeController();
            InitializeComponent();

            pn1      = new Panel();
            pn1.Dock = DockStyle.Fill;
            this.Controls.Add(pn1);

            sB1 = new C1StatusBar();
            sB1.AutoSizeElement = C1.Framework.AutoSizeElement.Width;
            sB1.Location        = new System.Drawing.Point(0, 428);
            sB1.Name            = "c1StatusBar1";
            sB1.Size            = new System.Drawing.Size(800, 22);
            lbStatus            = new RibbonLabel();
            btnStatus           = new RibbonButton();
            sB1.LeftPaneItems.Add(lbStatus);
            sB1.RightPaneItems.Add(btnStatus);
            lbStatus.Text        = "";
            btnStatus.Text       = "config";
            btnStatus.SmallImage = Resources.setting1;
            btnStatus.Click     += BtnStatus_Click;
            this.Controls.Add(sB1);
            lbStatus.Text = "";
            theme1.SetTheme(sB1, "Office2016DarkGray");

            initGrfQue();
            setGrfQueue();
            this.WindowState = FormWindowState.Normal;
            //this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.StartPosition = FormStartPosition.CenterScreen;
            pageLoad           = false;
        }
        private void InitializeRibbonStyleMenu()
        {
            ribbonStyleCombo.Items.Clear();
            string[] themes     = C1ThemeController.GetThemes();
            var      showThemes = themes.Where((tn) =>
            {
                var ltn = tn.ToLower();
                if (ltn.Contains("visualstyle")) // avoid old "visual style" themes
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            });

            ribbonStyleCombo.Items.Add("(No Theme)");
            foreach (string theme in showThemes)
            {
                ribbonStyleCombo.Items.Add(theme);
            }
            ribbonStyleCombo.SelectedIndex = 0;
        }
Exemple #21
0
        private void initConfig()
        {
            InitializeComponent();
            this.Size     = new System.Drawing.Size(1224, 768);
            fEdit         = new Font(bqc.iniC.grdViewFontName, bqc.grdViewFontSize, FontStyle.Regular);
            fEditPrintQue = new Font(bqc.iniC.printerQueueFontName, int.Parse(bqc.iniC.printerQueueFontSize), FontStyle.Regular);
            theme1        = new C1ThemeController();

            this.Text            = "Run-time Controls";
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.StartPosition   = FormStartPosition.CenterParent;
            //this.StartPosition = FormStartPosition.CenterParent;
            pn1      = new Panel();
            pn1.Dock = DockStyle.Fill;
            this.Controls.Add(pn1);

            sB1 = new C1StatusBar();
            sB1.AutoSizeElement = C1.Framework.AutoSizeElement.Width;
            sB1.Location        = new System.Drawing.Point(0, 428);
            sB1.Name            = "c1StatusBar1";
            sB1.Size            = new System.Drawing.Size(800, 22);
            lbStatus            = new RibbonLabel();
            btnStatus           = new RibbonButton();
            sB1.LeftPaneItems.Add(lbStatus);
            sB1.RightPaneItems.Add(btnStatus);
            lbStatus.Text        = "";
            btnStatus.Text       = "เพิ่มรายการ";
            btnStatus.SmallImage = Resources.setting1;
            btnStatus.Click     += BtnStatus_Click;

            this.Controls.Add(sB1);

            initGrfQueCaller();
            setGrfQueCaller();
            this.StartPosition = FormStartPosition.CenterScreen;
        }
Exemple #22
0
        private void Form1_Load(object sender, EventArgs e)
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\ComponentOne Samples\Common\";

            if (File.Exists(path + "c1nwind.mdb"))
            {
                AppDomain.CurrentDomain.SetData("DataDirectory", path);
            }

            // TODO: This line of code loads data into the 'c1NWINDDataSet.Employees' table. You can move, or remove it, as needed.
            this.employeesTableAdapter.Fill(this.c1NWINDDataSet.Employees);

            //
            // initialize C1Schedule
            //
            csMain.ShowReminderForm = false;

            DateTime    now = DateTime.Now;
            Appointment app = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0), TimeSpan.FromHours(1));

            app.Subject  = "test appointment";
            app.Location = "test location";
            app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]);

            app             = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day).AddDays(1), TimeSpan.FromHours(24));
            app.Subject     = "test event";
            app.AllDayEvent = true;
            app.Location    = "test location";
            app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]);

            //
            // initialize C1TrueDBGrid
            //
            _trueGridOptions.ShowCaption     = true;
            _trueGridOptions.ShowFilterBar   = true;
            _trueGridOptions.ShowGroupByArea = true;
            _trueGridOptions.DataView        = C1.Win.C1TrueDBGrid.DataViewEnum.Normal;

            //
            // initialize C1FlexGrid
            //
            _flexGridOptions.ViewMode       = FlexViewModeEnum.Normal;
            _flexGridOptions.FrozenColCount = 3;
            rnbCFGFixedColCount.Minimum     = 0;
            rnbCFGFixedColCount.Maximum     = c1FlexGrid1.Cols.Count;
            rnbCFGFixedRowCount.Minimum     = 0;
            rnbCFGFixedRowCount.Maximum     = c1FlexGrid1.Rows.Count;

            // fill items of C1SplitButton used to select C1FlexGrid view mode
            FillItems(csbSelectionMode, typeof(SelectionModeEnum));
            FillItems(csbFocusRect, typeof(FocusRectEnum));
            FillItems(rcbCFGSelectionMode, typeof(C1.Win.C1FlexGrid.SelectionModeEnum));
            FillItems(rcbCFGFocusRect, typeof(C1.Win.C1FlexGrid.FocusRectEnum));

            //
            UpdateControls();

            //
            UpdateMinimizeMaximize();

            //
            c1DockingTab2_SelectedTabChanged(null, EventArgs.Empty);

            // fill list of themes
            string[] themes = C1ThemeController.GetThemes();
            foreach (string theme in themes)
            {
                RibbonToggleButton rtb = new RibbonToggleButton();
                rtb.Text    = theme;
                rtb.Tag     = theme;
                rtb.Click  += OnThemeClick;
                rtb.Pressed = C1ThemeController.ApplicationTheme == theme;
                themeMenu.Items.Add(rtb);
            }
            themeMenu.Text = string.Format("Theme: {0}", C1ThemeController.ApplicationTheme);
        }
Exemple #23
0
        private void Form1_Load(object sender, EventArgs e)
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\ComponentOne Samples\Common\";

            if (File.Exists(path + "c1nwind.mdb"))
            {
                AppDomain.CurrentDomain.SetData("DataDirectory", path);
            }

            // TODO: This line of code loads data into the 'c1NWINDDataSet.Employees' table. You can move, or remove it, as needed.
            this.employeesTableAdapter.Fill(this.c1NWINDDataSet.Employees);

            //
            // initialize C1Schedule
            //
            csMain.ShowReminderForm = false;

            DateTime    now = DateTime.Now;
            Appointment app = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0), TimeSpan.FromHours(1));

            app.Subject  = "test appointment";
            app.Location = "test location";
            app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]);

            app             = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day).AddDays(1), TimeSpan.FromHours(24));
            app.Subject     = "test event";
            app.AllDayEvent = true;
            app.Location    = "test location";
            app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]);

            //
            // initialize C1TrueDBGrid
            //
            _trueGridOptions.ShowCaption     = true;
            _trueGridOptions.ShowFilterBar   = true;
            _trueGridOptions.ShowGroupByArea = true;
            _trueGridOptions.DataView        = C1.Win.C1TrueDBGrid.DataViewEnum.Normal;

            //
            // initialize C1FlexGrid
            //
            _flexGridOptions.ViewMode       = FlexViewModeEnum.Normal;
            _flexGridOptions.FrozenColCount = 3;

            //
            FillItems(ccmCFGSelectionMode, typeof(C1.Win.C1FlexGrid.SelectionModeEnum), SelectionModeCommandClick, SelectionModeCommandStateQuery);
            FillItems(ccmCFGFocusRect, typeof(C1.Win.C1FlexGrid.FocusRectEnum), FocusRectCommandClick, FocusRectCommandStateQuery);
            FillItems(csbSelectionMode, typeof(SelectionModeEnum));
            FillItems(csbFocusRect, typeof(FocusRectEnum));

            //
            UpdateControls();

            //
            c1DockingTab2_SelectedTabChanged(null, EventArgs.Empty);

            // fill list of themes
            string[] themes = C1ThemeController.GetThemes();
            ccmTheme.CommandLinks.Clear();
            for (int i = 0; i < themes.Length; i++)
            {
                C1Command cmd = new C1Command();
                cmd.Text               = themes[i];
                cmd.UserData           = themes[i];
                cmd.CommandStateQuery += OnThemeCommandStateQuery;
                cmd.Click             += OnThemeClick;
                C1CommandLink cl = new C1CommandLink(cmd);
                ccmTheme.CommandLinks.Add(cl);
            }
            ccmTheme.Text = string.Format("Theme: {0}", C1ThemeController.ApplicationTheme);
        }
        private void BtnCheck2_Click(object sender, EventArgs e)
        {
            int     cnt = 0, cntErr = 0;
            Decimal sum = 0, price1 = 0, net = 0, minus = 0;

            //throw new NotImplementedException();
            pB2.Show();
            pB2.Minimum = 0;
            pB2.Maximum = lItm.Count;
            ConnectDB conn;

            conn         = new ConnectDB(bc.iniC);
            lItmC        = new List <string>();
            lItmE        = new List <string>();
            label11.Text = chkBn1.Checked ? "bangna1" : chkBn2.Checked ? "bangna2" : chkBn5.Checked ? "bangna5" : "";
            label12.Text = cboYear.Text;
            label13.Text = cboMonth.Text;
            label14.Text = cboPeriod.Text;
            Application.DoEvents();
            //foreach (String str in lItm)
            foreach (DataRow str in dtChk.Rows)
            {
                try
                {
                    //String[] itm = str.Split('|');
                    //String[] itm = str.Split('|');
                    String col1 = "", date = "", hn = "", name = "", fntype = "", col6 = "", labname = "", labcode = "", labdate1 = "", labdate = "", labdateOld = "", price = "";
                    //col1 = itm[0];
                    //date = itm[1];
                    //hn = itm[2];
                    //name = itm[3];
                    //fntype = itm[4];
                    //col6 = itm[5];
                    //price = itm[6];
                    //labcode = itm[7];
                    //labname = itm[8];

                    col1    = str["col1"].ToString();
                    date    = str["date"].ToString();
                    hn      = str["hn"].ToString();
                    name    = str["ptt_name"].ToString();
                    fntype  = str["paidtype"].ToString();
                    col6    = str["net_price"].ToString();
                    price   = str["price"].ToString();
                    labcode = str["lab_code"].ToString();
                    labname = str["lab_name"].ToString();

                    labdate1 = (int.Parse(date.Substring(6)) - 543) + "-" + date.Substring(3, 2) + "-" + date.Substring(0, 2);
                    price1   = 0;
                    if (Decimal.TryParse(price, out price1))
                    {
                        sum += price1;
                    }
                    String    sql = "";
                    DataTable dt  = new DataTable();
                    //sql = "select lab_t05.MNC_req_no,LAB_T01.MNC_PRE_NO " +
                    //    "from PATIENT_T01 " +
                    //    "inner join LAB_T01 on LAB_T01.mnc_hn_no = PATIENT_T01.mnc_hn_no " +
                    //    "and LAB_T01.mnc_pre_no = PATIENT_T01.mnc_pre_no " +
                    //    "and LAB_T01.mnc_date = PATIENT_T01.MNC_DATE " +
                    //    "inner join LAB_T05 on lab_t05.MNC_REQ_YR = lab_t01.MNC_REQ_YR " +
                    //    "and lab_t05.MNC_REQ_no = lab_t01.MNC_REQ_no " +
                    //    "and lab_t05.MNC_REQ_dat = lab_t01.MNC_REQ_dat " +
                    //    "where lab_t05.MNC_REQ_DAT >= '" + labdate1 + "' " +
                    //    "and lab_t05.MNC_REQ_DAT <= '" + labdate1 + "' " +
                    //    //"and patient_t01.MNC_STS = 'f' " +
                    //    //"and LAB_T01.MNC_REQ_STS = 'Q' " +
                    //    "and LAB_T01.mnc_hn_no ='" + hn + "' " +
                    //    "and lab_t05.mnc_lb_cd ='" + labcode + "'";
                    sql = "select lab_t02.MNC_req_no,LAB_T01.MNC_PRE_NO " +
                          "from PATIENT_T01 " +
                          "inner join LAB_T01 on LAB_T01.mnc_hn_no = PATIENT_T01.mnc_hn_no " +
                          "and LAB_T01.mnc_pre_no = PATIENT_T01.mnc_pre_no " +
                          "and LAB_T01.mnc_date = PATIENT_T01.MNC_DATE " +
                          "inner join lab_t02 on lab_t02.MNC_REQ_YR = lab_t01.MNC_REQ_YR " +
                          "and lab_t02.MNC_REQ_no = lab_t01.MNC_REQ_no " +
                          "and lab_t02.MNC_REQ_dat = lab_t01.MNC_REQ_dat " +
                          "where lab_t02.MNC_REQ_DAT >= '" + labdate1 + "' " +
                          "and lab_t02.MNC_REQ_DAT <= '" + labdate1 + "' " +
                          //"and patient_t01.MNC_STS = 'f' " +
                          //"and LAB_T01.MNC_REQ_STS = 'Q' " +
                          "and LAB_T01.mnc_hn_no ='" + hn + "' " +
                          "and lab_t02.mnc_lb_cd ='" + labcode + "'";
                    dt = conn.selectData(conn.connMainHIS, sql);
                    if (dt.Rows.Count > 0)
                    {
                        //itm[8] = dt.Rows[0]["MNC_PRE_NO"].ToString();
                        //itm[9] = dt.Rows[0]["MNC_req_no"].ToString();
                        str["status_chk"] = "1";
                        listBox2.Items.Add(date + " " + hn + " " + name + " " + labcode + " " + labname);
                        lItmC.Add(col1 + "|" + date + "|" + hn + "|" + name + "|" + fntype + "|" + col6 + "|" + price + "|" + labcode + "|" + labname + "|" + dt.Rows[0]["MNC_PRE_NO"].ToString() + "|" + dt.Rows[0]["MNC_req_no"].ToString());
                        cnt++;
                        net += price1;
                        if ((cnt % 100) == 0)
                        {
                            Application.DoEvents();
                        }
                    }
                    else
                    {
                        cntErr++;
                        minus += price1;
                        listBox3.Items.Add(date + " " + hn + " " + name + " " + labcode + " " + labname);
                        lItmC.Add(col1 + "|" + date + "|" + hn + "|" + name + "|" + fntype + "|" + col6 + "|" + price + "|" + labcode + "|" + labname + "|0|0|-" + "|-");
                        lItmE.Add(col1 + "|" + date + "|" + hn + "|" + name + "|" + fntype + "|" + col6 + "|" + price + "|" + labcode + "|" + labname + "|0|0|-" + "|-");
                        int cnt1 = 0;
                        foreach (String paid in lPaid)
                        {
                            if (paid.Equals(fntype))
                            {
                                //int cnt2 = 0;
                                lPaidCntErr[cnt1]++;
                                //int.TryParse(lPaidCnt[cnt1],out cnt2);
                            }
                            cnt1++;
                        }
                        //itm[8] = dt.Rows[0]["MNC_PRE_NO"].ToString();
                        //itm[9] = dt.Rows[0]["MNC_req_no"].ToString();
                        //listBox2.Items.Add(itm.ToString());
                    }
                    pB2.Value++;
                }
                catch (Exception ex)
                {
                    MessageBox.Show("ex" + ex.Message, "");
                }
            }
            //Control ctn = this.GetControl("listBoxSum3");
            ListBox listsum = new ListBox();

            foreach (Control ctl in this.Controls)
            {
                if ((ctl is C1DockingTab) && (ctl.Name.Equals("tC")))
                {
                    foreach (Control ctl1 in ctl.Controls)
                    {
                        if ((ctl1 is C1DockingTabPage) && (ctl1.Name.Equals("tab3")))
                        {
                            foreach (Control ctl2 in ctl1.Controls)
                            {
                                if ((ctl2 is Panel) && (ctl2.Name.Equals("panel3")))
                                {
                                    foreach (Control ctl3 in ctl2.Controls)
                                    {
                                        if ((ctl3 is C1DockingTab) && (ctl3.Name.Equals("tC3")))
                                        {
                                            foreach (Control ctl4 in ctl3.Controls)
                                            {
                                                if ((ctl4 is C1DockingTabPage) && (ctl4.Name.Equals("tabsum")))
                                                {
                                                    foreach (Control ctl5 in ctl4.Controls)
                                                    {
                                                        if ((ctl5 is ListBox) && (ctl5.Name.Equals("listBoxSum3")))
                                                        {
                                                            listsum = (ListBox)ctl5;
                                                            listsum.Items.Clear();
                                                            int i = 0;
                                                            foreach (String txt in lPaid)
                                                            {
                                                                listsum.Items.Add(txt + "  จำนวน " + lPaidCnt[i] + " ไม่พบ จำนวน " + lPaidCntErr[i]);
                                                                i++;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            //listsum.Items.Clear();
            //int i = 0;
            //foreach (String txt in lPaid)
            //{
            //    listsum.Items.Add(txt + "  จำนวน " + lPaidCnt[i]+" ไม่พบ จำนวน "+ lPaidCntErr[i]);
            //    i++;
            //}

            pB1.Hide();
            label18.Text    = lItm.Count.ToString();
            label17.Text    = cnt.ToString();
            label16.Text    = cntErr.ToString();
            label15.Text    = sum.ToString("#,###.00");
            label23.Text    = net.ToString("#,###.00");
            label26.Text    = minus.ToString("#,###.00");
            btnTab3.Enabled = true;
            pB2.Hide();
            tC.SelectedTab = tab3;
            setGrf();
            //DataTable dt11 = new DataTable();
            dtChkGrp = GroupBy("paidtype", "paidtype", dtChk);
            setGrf11(dtChkGrp);
            if (dtChkGrp.Rows.Count > 0)
            {
                foreach (DataRow row in dtChkGrp.Rows)
                {
                    C1DockingTabPage tab1 = new C1DockingTabPage();
                    tab1.Text = row["paidtype"].ToString();
                    tC3.TabPages.Add(tab1);
                    C1FlexGrid grf = new C1FlexGrid();
                    grf.Font     = fEdit;
                    grf.Dock     = System.Windows.Forms.DockStyle.Fill;
                    grf.Location = new System.Drawing.Point(0, 0);
                    tab1.Controls.Add(grf);
                    DataRow[] result = dtChk.Select("paidtype = '" + row["paidtype"].ToString() + "'");
                    DataTable dt1    = new DataTable();
                    addColumn(dt1);
                    foreach (DataRow row1 in result)
                    {
                        DataRow row2 = dt1.NewRow();
                        ///row2 = row1;
                        row2["row1"]       = int.Parse(row1["row1"].ToString()) + 1;
                        row2["lab_code"]   = row1["lab_code"];
                        row2["lab_name"]   = row1["lab_name"];
                        row2["qty"]        = row1["qty"];
                        row2["price"]      = row1["price"];
                        row2["net_price"]  = row1["net_price"];
                        row2["amount"]     = row1["amount"];
                        row2["paidtype"]   = row1["paidtype"];
                        row2["status_chk"] = row1["status_chk"];
                        row2["ptt_name"]   = row1["ptt_name"];
                        row2["date"]       = row1["date"];
                        row2["hn"]         = row1["hn"];
                        row2["col1"]       = row1["col1"];
                        dt1.Rows.Add(row2);
                    }
                    DataTable dt2 = new DataTable();
                    dt2 = GroupBy1("lab_code", "lab_code", dt1);
                    foreach (DataRow row3 in dt2.Rows)
                    {
                        DataRow[] result1 = dtChk.Select("lab_code = '" + row3 ["lab_code"].ToString() + "'");
                        if (result.Length > 0)
                        {
                            row3["lab_name"] = result1[0]["lab_name"].ToString();
                        }
                        Console.WriteLine("{0}, {1}", row[0], row[1]);
                    }
                    //dt1.ad
                    grf.DataSource                = dt2;
                    grf.Cols["price"].Visible     = false;
                    grf.Cols["net_price"].Visible = false;
                    grf.Cols["amount"].Visible    = false;
                    grf.Cols["lab_code"].Width    = 100;
                    grf.Cols["lab_name"].Width    = 300;
                    C1Theme theme = C1ThemeController.GetThemeByName("Office2013Red", false);
                    C1ThemeController.ApplyThemeToObject(grf, theme);
                }
            }
            //pB1.Show();
        }
        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();

            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);

            lbStkSubName                     = new Label();
            lbStkSubName.Text                = "รับเข้า :";
            lbStkSubName.Font                = fEdit;
            lbStkSubName.Location            = new System.Drawing.Point(gapX, lbYear.Location.Y);
            lbStkSubName.AutoSize            = true;
            lbStkSubName.Name                = "lbStkSubName";
            cboStkSubName                    = new C1ComboBox();
            cboStkSubName.AllowSpinLoop      = false;
            cboStkSubName.BorderStyle        = System.Windows.Forms.BorderStyle.FixedSingle;
            cboYear.Font                     = fEdit;
            cboStkSubName.GapHeight          = 0;
            cboStkSubName.ImagePadding       = new System.Windows.Forms.Padding(0);
            cboStkSubName.ItemsDisplayMember = "";
            cboStkSubName.ItemsValueMember   = "";
            cboStkSubName.Location           = new System.Drawing.Point(662, lbStkSubName.Location.Y);
            cboStkSubName.Name               = "cboStkSubName";
            cboStkSubName.Size               = new System.Drawing.Size(400, 20);
            cboStkSubName.TabIndex           = 562;
            cboStkSubName.Tag                = null;
            theme1.SetTheme(cboStkSubName, "(default)");
            cboStkSubName.VisualStyle          = C1.Win.C1Input.VisualStyle.Office2007Blue;
            cboStkSubName.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            cboStkSubName.Location             = new Point(gapColName, lbStkSubName.Location.Y);

            btnNew          = new C1Button();
            btnNew.Name     = "btnNew";
            btnNew.Text     = "ป้อนรับเข้า";
            btnNew.Font     = this.fEdit;
            size            = ic.MeasureString(btnNew);
            btnNew.Size     = new Size(60, 40);
            btnNew.Location = new Point(pnBody.Width - size.Width - 40, lbStkSubName.Location.Y);
            btnNew.Click   += BtnNew_Click;

            pnTop.Controls.Add(lbYear);
            pnTop.Controls.Add(cboYear);
            pnTop.Controls.Add(lbStkSubName);
            pnTop.Controls.Add(cboStkSubName);
            pnTop.Controls.Add(btnNew);
            this.Controls.Add(pnBody);
            this.Controls.Add(pnTop);
            theme1.SetTheme(pnBody, ic.iniC.themeApp);
            theme1.SetTheme(pnTop, "Office2010Red");
            pnTop.ResumeLayout(false);
            pnBody.ResumeLayout(false);
            pnBody.PerformLayout();
            pnTop.PerformLayout();
        }
 private void c1ThemeController1_ThemeChanged(C1ThemeController sender, ThemeEventArgs e)
 {
     c1ThemeController1.SetTheme(_dropDownFilter.DataFilter, e.ThemeName);
 }
Exemple #27
0
 private void Themes_Load(object sender, EventArgs e)
 {
     cmbThemes.Items.AddRangeValues(C1ThemeController.GetThemes());
 }
Exemple #28
0
        public ScriptEditorFormEx(
            MainForm mainForm,
            C1FlexReport report,
            string scriptContextName,
            // either this:
            ITypeDescriptorContext typeDescriptorContext,
            // or these two:
            object propertyOwner,
            string propertyName,
            // if non-null, used instead of derived name for display ONLY (does not affect script item key)
            string displayName,
            //
            bool isScript)
            : this()
        {
            System.Diagnostics.Debug.Assert(typeDescriptorContext != null || (propertyOwner != null && !string.IsNullOrEmpty(propertyName)));

            AutoScaleMode       = AutoScaleMode.None;
            Font                = MainForm.DefaultAppFont;
            _mainForm           = mainForm;
            _report             = report;
            _contexts           = new EditorScriptContextCollection(this, report, _mainForm.FlexDesigner);
            _activeScriptEditor = _scriptEditor0;
            //
            rbnMain.BeginUpdate();
            //
            _scriptEditor1.TextBox.Font          = _scriptEditor0.TextBox.Font = _mainForm._scriptEditorFont;
            _scriptEditor1.EditorBackgroundColor = _scriptEditor0.EditorBackgroundColor = _mainForm._scriptEditorBackColor;
            _scriptEditor1.EditorTextColor       = _scriptEditor0.EditorTextColor = _mainForm._scriptEditorForeColor;
            _scriptEditor1.SyntaxAutoCheck       = _scriptEditor0.SyntaxAutoCheck = _mainForm._syntaxCheck;
            _scriptEditor1.AutoSaveCurrentScript = _scriptEditor0.AutoSaveCurrentScript = _mainForm._scriptEditorAutoSave;
            // init options in ribbon UI:
            rbEditorFontName.Text             = _mainForm._scriptEditorFont.Name;
            rbBackgroundColor.Color           = _mainForm._scriptEditorBackColor;
            rbTextColor.Color                 = _mainForm._scriptEditorForeColor;
            rbSyntaxHighlight.Checked         = _mainForm._syntaxColoring;
            rbSyntaxAutoCheck.Checked         = _mainForm._syntaxCheck;
            rbAutoSave.Checked                = _mainForm._scriptEditorAutoSave;
            rbDataSourceFilterWarning.Checked = _mainForm._scriptEditorDataSourceFilterWarning;
            // font size:
            for (int i = c_minFontSize; i <= c_maxFontSize; ++i)
            {
                rbFontSize.Items.Add(i.ToString());
            }
            rbFontSize.Text = ((int)Math.Round(_scriptEditor0.EditorFont.Size)).ToString();

            _scriptEditor0.TextBox.GotFocus         += ScriptEditorGotFocus;
            _scriptEditor0.CurrentScriptItemChanged += CurrentScriptItemChanged;
            _scriptEditor0.CurrentScriptTextChanged += CurrentScriptTextChanged;
            _scriptEditor0.ScriptWritten            += ScriptWritten;
            _scriptEditor0.TextSelectionChanged     += TextSelectionChanged;
            _scriptEditor0.SyntaxCheckNeeded        += SyntaxCheckNeeded;

            _scriptEditor1.TextBox.GotFocus         += ScriptEditorGotFocus;
            _scriptEditor1.CurrentScriptItemChanged += CurrentScriptItemChanged;
            _scriptEditor1.CurrentScriptTextChanged += CurrentScriptTextChanged;
            _scriptEditor1.ScriptWritten            += ScriptWritten;
            _scriptEditor1.TextSelectionChanged     += TextSelectionChanged;
            _scriptEditor1.SyntaxCheckNeeded        += SyntaxCheckNeeded;

            _scriptItems = new EditorScriptItemCollection(_report, _contexts, _mainForm.FlexDesigner);

            // initial mode we start with:
            bool splitWindowMode = _mainForm._scriptEditorSplitWindowDistance > 0;

            // script data context:
            EditorScriptContextBase context = _contexts.GetContext(scriptContextName);

            System.Diagnostics.Debug.Assert(context != null);

            // this is patchy but will do for now:
            // - if we are being called from prop grid, then we have EditContext and edit that;
            // - else, if we are called to edit an expression - this is creating a new field;
            // - else, the big "Edit Scripts" button was pressed, and we default to GlobalScripts.

            EditorScriptItem scriptItem;

            if (typeDescriptorContext != null)
            {
                scriptItem = EditorScriptItem.FromTypeDescriptorContext(typeDescriptorContext, context, isScript, displayName);
            }
            else
            {
                scriptItem = EditorScriptItem.FromObjectProperty(propertyOwner, propertyName, context, isScript, displayName);
            }

            // A script item may not be "collected" if it is a new calc field being added, or e.g. in Maps there are many expressions:
            if (!_scriptItems.ContainsKey(scriptItem.Key))
            {
                scriptItem.EnsureTopKey();
                _scriptItems.Add(scriptItem.Key, scriptItem);
            }

            _scriptEditor0.Init(mainForm, _report, _scriptItems);
            _scriptEditor1.Init(mainForm, _report, _scriptItems);

            // _scriptItemKey is used ONLY for returning the script with which we were called:
            _scriptItemKey = scriptItem.Key;
            if (splitWindowMode)
            {
                _scriptEditor1.SetCurrentScriptItem(_scriptItemKey, Forms.ScriptEditorControl.SetCurrentScriptItemContext.Initial);
                if (_scriptItems.ContainsKey(_mainForm._scriptEditorLastItemKey0))
                {
                    _scriptEditor0.SetCurrentScriptItem(_mainForm._scriptEditorLastItemKey0, Forms.ScriptEditorControl.SetCurrentScriptItemContext.Initial);
                }
                else
                {
                    _scriptEditor0.SetCurrentScriptItem(_scriptItemKey, Forms.ScriptEditorControl.SetCurrentScriptItemContext.Initial);
                }
            }
            else
            {
                _scriptEditor0.SetCurrentScriptItem(_scriptItemKey, Forms.ScriptEditorControl.SetCurrentScriptItemContext.Initial);
                _scriptEditor1.SetCurrentScriptItem(_scriptItemKey, Forms.ScriptEditorControl.SetCurrentScriptItemContext.Initial);
            }

            // Apply main window's theme:
            var tl    = new C1ThemeLocator(_mainForm.Theme);
            var theme = tl.GetTheme();

            if (theme != null)
            {
                C1ThemeController.ApplyThemeToControlTree(this, theme);
                C1ThemeController.ApplyThemeToObject(contextMenu, theme);
            }

            // Set up script editors' glyphs - splitter and close window:
            _scriptEditor0.GlyphBox.Cursor = Cursors.HSplit;
            _scriptEditor1.GlyphBox.Image  = Properties.Resources.SplitWindowClose_16x16;

            _splitter.SplitterMoved                     += Splitter_SplitterMoved;
            _scriptEditor0.GlyphBox.MouseEnter          += GlyphBox0_MouseEnter;
            _scriptEditor0.GlyphBox.MouseLeave          += GlyphBox0_MouseLeave;
            _scriptEditor0.GlyphBox.MouseDown           += GlyphBox0_MouseDown;
            _scriptEditor0.GlyphBox.MouseMove           += GlyphBox0_MouseMove;
            _scriptEditor0.GlyphBox.MouseUp             += GlyphBox0_MouseUp;
            _scriptEditor0.GlyphBox.MouseCaptureChanged += GlyphBox0_MouseCaptureChanged;
            _scriptEditor1.GlyphBox.MouseDown           += GlyphBox1_MouseDown;

            // Ready to start:
            UpdateStatusBar();
            //
            rbnMain.EndUpdate();
            //
        }
Exemple #29
0
        public static void ApplyTheme(Control control)
        {
            var theme = Theme;

            if (theme != null)
            {
                if (control == TheExplorer)
                {
                    // color all icons according to the new loaded theme
                    Color foreground      = Theme.GetColor(@"BaseThemeProperties\ControlText");
                    bool  needUpdateIcons = foreground != TheExplorer._icons.Foreground;
                    if (needUpdateIcons)
                    {
                        TheExplorer._icons.Foreground = foreground;
                        // Data Visualization group
                        ApplyTileImages(TheExplorer.tilesControlDV.Groups[0].Tiles);
                        // Grids and Data Management group
                        ApplyTileImages(TheExplorer.tilesControlGDM.Groups[0].Tiles);
                        // Input and Editing group
                        ApplyTileImages(TheExplorer.tilesControlIaE.Groups[0].Tiles);
                        // Navigation and Layout group
                        ApplyTileImages(TheExplorer.tilesControlNaL.Groups[0].Tiles);
                        // Reporting and Documents group
                        ApplyTileImages(TheExplorer.tilesControlRaD.Groups[0].Tiles);
                        // Scheduling group
                        ApplyTileImages(TheExplorer.tilesControlSch.Groups[0].Tiles);
                        // Utilities group
                        ApplyTileImages(TheExplorer.tilesControlUtil.Groups[0].Tiles);

                        // new
                        ApplyTileImages(TheExplorer.tilesNew.Groups[0].Tiles);
                        // favorites
                        ApplyTileImages(TheExplorer.tilesPopular.Groups[0].Tiles);
                    }
                    TheExplorer.UpdateStyles();
                }

                if (control.FindForm() == TheExplorer)
                {
                    // Controls that rely on specific colors to be visible/usable:
                    List <Control> noTheming = new List <Control>()
                    {
                        TheExplorer.pnlInputPanel,
                    };
                    C1ThemeController.ApplyThemeToControlTree(control, theme, (c) => !noTheming.Contains(c) && (!(c is C1DemoForm) || ((C1DemoForm)c).IsThemeable));
                }
                else
                {
                    var demoForm = control as C1DemoForm;
                    if (demoForm == null || demoForm.IsThemeable)
                    {
                        C1ThemeController.ApplyThemeToControlTree(control, theme);
                    }
                }

                // Style non themable controls for uniformity
                StyleForNonThemableControls();

                if (control == TheExplorer)
                {
                    OnThemeApplied(EventArgs.Empty);
                }
            }
        }
        private void InitComponent()
        {
            int  gapLine = 30, gapX = 20, gapY = 20;
            Size size = new Size();
            int  scrW = Screen.PrimaryScreen.Bounds.Width;

            fEdit    = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Regular);
            fEditB   = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Bold);
            imgStart = Resources.accept_database24;

            theme1       = new C1ThemeController();
            theme1.Theme = ic.theme;
            panel1       = new Panel();

            panel1.SuspendLayout();

            panel1.Dock = System.Windows.Forms.DockStyle.Fill;
            panel1.Name = "panel1";

            txtID      = new C1TextBox();
            txtID.Font = fEdit;
            //txtID.Location = new System.Drawing.Point(cboPkg.Location.X, lbName.Location.Y);
            txtID.Size = new Size(120, 20);
            txtID.Name = "txtID";
            txtID.Hide();

            lbDate                                = new Label();
            lbDate.Text                           = "Date : ";
            lbDate.Font                           = fEdit;
            lbDate.Location                       = new System.Drawing.Point(gapX, gapY);
            lbDate.AutoSize                       = true;
            lbDate.Name                           = "lbDate";
            txtDate                               = new C1.Win.C1Input.C1DateEdit();
            txtDate.Font                          = fEdit;
            txtDate.AllowSpinLoop                 = false;
            txtDate.BorderStyle                   = System.Windows.Forms.BorderStyle.FixedSingle;
            txtDate.Calendar.ArrowColor           = System.Drawing.Color.Black;
            txtDate.Calendar.BackColor            = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            txtDate.Calendar.DayNamesFont         = new System.Drawing.Font("Tahoma", 8F);
            txtDate.Calendar.Font                 = new System.Drawing.Font("Tahoma", 8F);
            txtDate.Calendar.ForeColor            = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            txtDate.Calendar.SelectionBackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(71)))), ((int)(((byte)(47)))));
            txtDate.Calendar.SelectionForeColor   = System.Drawing.Color.White;
            txtDate.Calendar.TitleBackColor       = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
            txtDate.Calendar.TitleFont            = new System.Drawing.Font("Tahoma", 8F);
            txtDate.Calendar.TitleForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            txtDate.Calendar.TodayBorderColor     = System.Drawing.Color.White;
            txtDate.Calendar.TrailingForeColor    = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152)))));
            txtDate.Calendar.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            txtDate.Culture                       = 1054;
            txtDate.CurrentTimeZone               = false;
            txtDate.DisabledForeColor             = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152)))));
            txtDate.DisplayFormat.CalendarType    = C1.Win.C1Input.CalendarType.GregorianCalendar;
            txtDate.DisplayFormat.FormatType      = C1.Win.C1Input.FormatTypeEnum.ShortDate;
            txtDate.DisplayFormat.Inherit         = ((C1.Win.C1Input.FormatInfoInheritFlags)(((((C1.Win.C1Input.FormatInfoInheritFlags.CustomFormat | C1.Win.C1Input.FormatInfoInheritFlags.NullText)
                                                                                                | C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull)
                                                                                               | C1.Win.C1Input.FormatInfoInheritFlags.TrimStart)
                                                                                              | C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd)));
            txtDate.EditFormat.CalendarType = C1.Win.C1Input.CalendarType.GregorianCalendar;
            txtDate.EditFormat.FormatType   = C1.Win.C1Input.FormatTypeEnum.ShortDate;
            txtDate.EditFormat.Inherit      = ((C1.Win.C1Input.FormatInfoInheritFlags)(((((C1.Win.C1Input.FormatInfoInheritFlags.CustomFormat | C1.Win.C1Input.FormatInfoInheritFlags.NullText)
                                                                                          | C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull)
                                                                                         | C1.Win.C1Input.FormatInfoInheritFlags.TrimStart)
                                                                                        | C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd)));
            txtDate.EmptyAsNull  = true;
            txtDate.GMTOffset    = System.TimeSpan.Parse("00:00:00");
            txtDate.ImagePadding = new System.Windows.Forms.Padding(0);
            size             = ic.MeasureString(lbDate);
            txtDate.Location = new System.Drawing.Point(lbDate.Location.X + size.Width + 10, lbDate.Location.Y);
            txtDate.Name     = "txtDate";
            txtDate.Size     = new System.Drawing.Size(133, 18);
            txtDate.TabIndex = 510;
            txtDate.Tag      = null;
            theme1.SetTheme(this.txtDate, "(default)");
            txtDate.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            gapY                     += gapLine;
            lbPkg                     = new Label();
            lbPkg.Font                = fEdit;
            lbPkg.Name                = "lbPkg";
            lbPkg.Text                = "Package : ";
            lbPkg.Font                = fEdit;
            lbPkg.Location            = new System.Drawing.Point(gapX, gapY);
            lbPkg.AutoSize            = true;
            cboPkg                    = new C1ComboBox();
            cboPkg.Font               = fEdit;
            cboPkg.Name               = "cboPkg";
            size                      = ic.MeasureString(lbPkg);
            cboPkg.Location           = new System.Drawing.Point(lbPkg.Location.X + lbPkg.Width + 20, lbPkg.Location.Y);
            cboPkg.AllowSpinLoop      = false;
            cboPkg.BorderStyle        = System.Windows.Forms.BorderStyle.FixedSingle;
            cboPkg.DisabledForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152)))));
            cboPkg.Font               = fEdit;
            cboPkg.GapHeight          = 0;
            cboPkg.ImagePadding       = new System.Windows.Forms.Padding(0);
            cboPkg.ItemsDisplayMember = "";
            cboPkg.ItemsValueMember   = "";
            //cboPkg.Location = new System.Drawing.Point(106, 12);
            cboPkg.Size = new System.Drawing.Size(480, 20);
            cboPkg.Style.DropDownBackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            cboPkg.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro;
            cboPkg.Style.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222)));
            cboPkg.TabIndex   = 538;
            cboPkg.Tag        = null;
            theme1.SetTheme(cboPkg, "(default)");
            cboPkg.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            gapY            += gapLine;
            lbName           = new Label();
            lbName.Font      = fEdit;
            lbName.Text      = "Name : ";
            lbName.Location  = new System.Drawing.Point(gapX, gapY);
            lbName.AutoSize  = true;
            lbName.Name      = "lbName";
            txtName          = new C1TextBox();
            txtName.Font     = fEdit;
            txtName.Name     = "txtName";
            size             = ic.MeasureString(lbName);
            txtName.Location = new System.Drawing.Point(cboPkg.Location.X, lbName.Location.Y);
            txtName.Size     = new Size(120, 20);

            gapY += gapLine;
            chkEmbryoFreezing             = new C1.Win.C1Input.C1CheckBox();
            chkEmbryoFreezing.Font        = fEdit;
            chkEmbryoFreezing.Text        = "Embryo freezing ";
            chkEmbryoFreezing.Name        = "chkEmbryoFreezing";
            chkEmbryoFreezing.BackColor   = System.Drawing.Color.Transparent;
            chkEmbryoFreezing.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkEmbryoFreezing.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkEmbryoFreezing.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkEmbryoFreezing.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkEmbryoFreezing.Location    = new System.Drawing.Point(gapX, gapY);
            chkEmbryoFreezing.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkEmbryoFreezing.Size        = new System.Drawing.Size(180, 24);
            chkEmbryoFreezing.TabIndex    = 553;
            theme1.SetTheme(this.chkEmbryoFreezing, "(default)");
            chkEmbryoFreezing.UseVisualStyleBackColor = true;
            chkEmbryoFreezing.Value = null;
            chkEmbryoFreezing.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkEmbryoFreezing.AutoSize             = true;
            txtEmbryoFreezing      = new C1TextBox();
            txtEmbryoFreezing.Font = fEdit;
            size = ic.MeasureString(chkEmbryoFreezing);
            txtEmbryoFreezing.Location = new System.Drawing.Point(chkEmbryoFreezing.Location.X + size.Width + 25, chkEmbryoFreezing.Location.Y);
            txtEmbryoFreezing.Size     = new Size(40, 20);
            txtEmbryoFreezing.Name     = "txtEmbryoFreezing";
            lbEmbryoFreezing           = new Label();
            lbEmbryoFreezing.Font      = fEdit;
            lbEmbryoFreezing.Text      = "embryos ";
            lbEmbryoFreezing.Name      = "lbEmbryoFreezing";
            lbEmbryoFreezing.Location  = new System.Drawing.Point(txtEmbryoFreezing.Location.X + txtEmbryoFreezing.Width + 5, chkEmbryoFreezing.Location.Y);
            lbEmbryoFreezing.AutoSize  = true;
            txtEmbryoStraws            = new C1TextBox();
            txtEmbryoStraws.Font       = fEdit;
            size = ic.MeasureString(lbEmbryoFreezing);
            txtEmbryoStraws.Location  = new System.Drawing.Point(lbEmbryoFreezing.Location.X + size.Width + 15, chkEmbryoFreezing.Location.Y);
            txtEmbryoStraws.Size      = new Size(40, 20);
            txtEmbryoStraws.Name      = "txtEmbryoStraws";
            lbEmbryoStraws            = new Label();
            lbEmbryoStraws.Font       = fEdit;
            lbEmbryoStraws.Text       = "straws (Extra ";
            lbEmbryoStraws.Name       = "lbEmbryoStraws";
            lbEmbryoStraws.Location   = new System.Drawing.Point(txtEmbryoStraws.Location.X + txtEmbryoStraws.Width + 5, chkEmbryoFreezing.Location.Y);
            lbEmbryoStraws.AutoSize   = true;
            txtEmbryoStrawsExtra      = new C1TextBox();
            txtEmbryoStrawsExtra.Font = fEdit;
            size = ic.MeasureString(lbEmbryoStraws);
            txtEmbryoStrawsExtra.Location = new System.Drawing.Point(lbEmbryoStraws.Location.X + size.Width + 5, chkEmbryoFreezing.Location.Y);
            txtEmbryoStrawsExtra.Size     = new Size(40, 20);
            lbEmbryoEmbryo          = new Label();
            lbEmbryoEmbryo.Font     = fEdit;
            lbEmbryoEmbryo.Text     = "embryos) ";
            lbEmbryoEmbryo.Name     = "lbEmbryoEmbryo";
            lbEmbryoEmbryo.Location = new System.Drawing.Point(txtEmbryoStrawsExtra.Location.X + txtEmbryoStrawsExtra.Width + 5, chkEmbryoFreezing.Location.Y);
            lbEmbryoEmbryo.AutoSize = true;

            gapY              += gapLine;
            chkNGS             = new C1.Win.C1Input.C1CheckBox();
            chkNGS.Font        = fEdit;
            chkNGS.Text        = "NGS ";
            chkNGS.Name        = "chkNGS";
            chkNGS.BackColor   = System.Drawing.Color.Transparent;
            chkNGS.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkNGS.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkNGS.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkNGS.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkNGS.Location    = new System.Drawing.Point(gapX, gapY);
            chkNGS.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkNGS.Size        = new System.Drawing.Size(180, 24);
            chkNGS.TabIndex    = 553;
            theme1.SetTheme(this.chkNGS, "(default)");
            chkNGS.UseVisualStyleBackColor = true;
            chkNGS.Value = null;
            chkNGS.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            txtNGSEmbryo      = new C1TextBox();
            txtNGSEmbryo.Font = fEdit;
            size = ic.MeasureString(chkNGS);
            txtNGSEmbryo.Location = new System.Drawing.Point(chkNGS.Location.X + chkNGS.Width, chkNGS.Location.Y);
            txtNGSEmbryo.Size     = new Size(60, 20);
            txtNGSEmbryo.Name     = "txtNGSEmbryo";
            lbNGSEmbryo           = new Label();
            lbNGSEmbryo.Font      = fEdit;
            lbNGSEmbryo.Text      = "embryo  (Extra ";
            lbNGSEmbryo.Name      = "lbNGSEmbryo";
            lbNGSEmbryo.Location  = new System.Drawing.Point(txtNGSEmbryo.Location.X + txtNGSEmbryo.Width, chkNGS.Location.Y);
            lbNGSEmbryo.AutoSize  = true;
            txtNGSExtra           = new C1TextBox();
            txtNGSExtra.Font      = fEdit;
            size = ic.MeasureString(lbNGSEmbryo);
            txtNGSExtra.Location = new System.Drawing.Point(lbNGSEmbryo.Location.X + lbNGSEmbryo.Width, chkNGS.Location.Y);
            txtNGSExtra.Size     = new Size(60, 20);
            txtNGSExtra.Name     = "txtNGSExtra";
            lbNGSExtra           = new Label();
            lbNGSExtra.Text      = "embryos) ";
            lbNGSExtra.Font      = fEdit;
            lbNGSExtra.Location  = new System.Drawing.Point(txtNGSExtra.Location.X + txtNGSExtra.Width, chkNGS.Location.Y);
            lbNGSExtra.AutoSize  = true;
            lbNGSExtra.Name      = "lbNGSExtra";

            gapY              += gapLine;
            chkPGS             = new C1.Win.C1Input.C1CheckBox();
            chkPGS.BackColor   = System.Drawing.Color.Transparent;
            chkPGS.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkPGS.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkPGS.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkPGS.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkPGS.Location    = new System.Drawing.Point(gapX, gapY);
            chkPGS.Name        = "chkPGS";
            chkPGS.Text        = "PGS ";
            size               = ic.MeasureString(chkPGS);
            chkPGS.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkPGS.Size        = new System.Drawing.Size(size.Width + 30, 24);
            chkPGS.TabIndex    = 553;
            theme1.SetTheme(this.chkPGS, "(default)");
            chkPGS.UseVisualStyleBackColor = true;
            chkPGS.Value = null;
            chkPGS.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkPGS.Font           = fEdit;
            txtPGSEmbryo          = new C1TextBox();
            txtPGSEmbryo.Font     = fEdit;
            txtPGSEmbryo.Location = new System.Drawing.Point(chkPGS.Location.X + size.Width + 35, chkPGS.Location.Y);
            txtPGSEmbryo.Size     = new Size(60, 20);
            txtPGSEmbryo.Name     = "txtPGSEmbryo";
            lbPGSEmbryo           = new Label();
            lbPGSEmbryo.Font      = fEdit;
            lbPGSEmbryo.Name      = "lbPGSEmbryo";
            lbPGSEmbryo.Text      = "embryo  (Extra ";
            lbPGSEmbryo.Location  = new System.Drawing.Point(txtPGSEmbryo.Location.X + txtPGSEmbryo.Width, chkPGS.Location.Y);
            lbPGSEmbryo.AutoSize  = true;

            txtPGSExtra          = new C1TextBox();
            txtPGSExtra.Font     = fEdit;
            size                 = ic.MeasureString(lbPGSEmbryo);
            txtPGSExtra.Location = new System.Drawing.Point(lbPGSEmbryo.Location.X + size.Width, chkPGS.Location.Y);
            txtPGSExtra.Size     = new Size(60, 20);
            txtPGSExtra.Name     = "txtPGSExtra";
            lbPGSExtra           = new Label();
            lbPGSExtra.Font      = fEdit;
            lbPGSExtra.Text      = "embryos) ";
            lbPGSExtra.Name      = "lbPGSExtra";
            lbPGSExtra.Location  = new System.Drawing.Point(txtPGSExtra.Location.X + txtPGSExtra.Width, chkPGS.Location.Y);
            lbPGSExtra.AutoSize  = true;

            gapY               += gapLine;
            chkDay6             = new C1.Win.C1Input.C1CheckBox();
            chkDay6.Font        = fEdit;
            chkDay6.Name        = "chkPGS";
            chkDay6.Text        = "Day 6 ";
            chkDay6.BackColor   = System.Drawing.Color.Transparent;
            chkDay6.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkDay6.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkDay6.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkDay6.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkDay6.Location    = new System.Drawing.Point(gapX, gapY);
            chkDay6.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkDay6.Size        = new System.Drawing.Size(180, 24);
            chkDay6.TabIndex    = 553;
            theme1.SetTheme(this.chkDay6, "(default)");
            chkDay6.UseVisualStyleBackColor = true;
            chkDay6.Value = null;
            chkDay6.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            gapY += gapLine;
            chkAssistedHatching             = new C1.Win.C1Input.C1CheckBox();
            chkAssistedHatching.BackColor   = System.Drawing.Color.Transparent;
            chkAssistedHatching.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkAssistedHatching.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkAssistedHatching.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkAssistedHatching.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkAssistedHatching.Location    = new System.Drawing.Point(gapX, gapY);
            chkAssistedHatching.Name        = "chkAssistedHatching";
            chkAssistedHatching.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkAssistedHatching.Size        = new System.Drawing.Size(180, 24);
            chkAssistedHatching.TabIndex    = 553;
            chkAssistedHatching.Text        = "Assisted Hatching ";
            theme1.SetTheme(this.chkAssistedHatching, "(default)");
            chkAssistedHatching.UseVisualStyleBackColor = true;
            chkAssistedHatching.Value = null;
            chkAssistedHatching.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkAssistedHatching.Font = fEdit;

            gapY             += gapLine;
            chkHA             = new C1.Win.C1Input.C1CheckBox();
            chkHA.BackColor   = System.Drawing.Color.Transparent;
            chkHA.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkHA.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkHA.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkHA.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkHA.Location    = new System.Drawing.Point(gapX, gapY);
            chkHA.Name        = "chkHA";
            chkHA.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkHA.Size        = new System.Drawing.Size(180, 24);
            chkHA.TabIndex    = 553;
            chkHA.Text        = "HA Assist selection ";
            theme1.SetTheme(this.chkHA, "(default)");
            chkHA.UseVisualStyleBackColor = true;
            chkHA.Value = null;
            chkHA.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkHA.Font = fEdit;

            gapY += gapLine;
            chkSpermSelection             = new C1.Win.C1Input.C1CheckBox();
            chkSpermSelection.BackColor   = System.Drawing.Color.Transparent;
            chkSpermSelection.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkSpermSelection.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkSpermSelection.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkSpermSelection.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkSpermSelection.Location    = new System.Drawing.Point(gapX, gapY);
            chkSpermSelection.Name        = "chkSpermSelection";
            chkSpermSelection.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkSpermSelection.Size        = new System.Drawing.Size(180, 24);
            chkSpermSelection.TabIndex    = 553;
            chkSpermSelection.Text        = "Sperm Selection ";
            theme1.SetTheme(this.chkSpermSelection, "(default)");
            chkSpermSelection.UseVisualStyleBackColor = true;
            chkSpermSelection.Value = null;
            chkSpermSelection.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkSpermSelection.Font = fEdit;
            txtSpermSelection      = new C1TextBox();
            txtSpermSelection.Font = fEdit;
            size = ic.MeasureString(chkSpermSelection);
            txtSpermSelection.Location = new System.Drawing.Point(chkSpermSelection.Location.X + chkSpermSelection.Width, chkSpermSelection.Location.Y);
            txtSpermSelection.Size     = new Size(60, 20);
            txtSpermSelection.Name     = "txtSpermSelection";

            gapY += gapLine;
            chkSpermPrecaution             = new C1.Win.C1Input.C1CheckBox();
            chkSpermPrecaution.BackColor   = System.Drawing.Color.Transparent;
            chkSpermPrecaution.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkSpermPrecaution.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkSpermPrecaution.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkSpermPrecaution.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkSpermPrecaution.Location    = new System.Drawing.Point(gapX, gapY);
            chkSpermPrecaution.Name        = "chkSpermPrecaution";
            chkSpermPrecaution.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkSpermPrecaution.Size        = new System.Drawing.Size(180, 24);
            chkSpermPrecaution.TabIndex    = 553;
            chkSpermPrecaution.Text        = "Sperm Precaution ";
            theme1.SetTheme(this.chkSpermPrecaution, "(default)");
            chkSpermPrecaution.UseVisualStyleBackColor = true;
            chkSpermPrecaution.Value = null;
            chkSpermPrecaution.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkSpermPrecaution.Font = fEdit;
            txtSpermPrecaution      = new C1TextBox();
            txtSpermPrecaution.Font = fEdit;
            size = ic.MeasureString(chkSpermPrecaution);
            txtSpermPrecaution.Location = new System.Drawing.Point(chkSpermPrecaution.Location.X + chkSpermPrecaution.Width, chkSpermPrecaution.Location.Y);
            txtSpermPrecaution.Size     = new Size(60, 20);
            txtSpermPrecaution.Name     = "txtSpermPrecaution";

            gapY                     += gapLine;
            chkEmbryoGlue             = new C1.Win.C1Input.C1CheckBox();
            chkEmbryoGlue.BackColor   = System.Drawing.Color.Transparent;
            chkEmbryoGlue.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkEmbryoGlue.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkEmbryoGlue.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkEmbryoGlue.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkEmbryoGlue.Location    = new System.Drawing.Point(gapX, gapY);
            chkEmbryoGlue.Name        = "chkEmbryoGlue";
            chkEmbryoGlue.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkEmbryoGlue.Size        = new System.Drawing.Size(180, 24);
            chkEmbryoGlue.TabIndex    = 553;
            chkEmbryoGlue.Text        = "Embryo Glue ";
            theme1.SetTheme(this.chkEmbryoGlue, "(default)");
            chkEmbryoGlue.UseVisualStyleBackColor = true;
            chkEmbryoGlue.Value = null;
            chkEmbryoGlue.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkEmbryoGlue.Font = fEdit;

            gapY += gapLine;
            chkEmbryoRemaining             = new C1.Win.C1Input.C1CheckBox();
            chkEmbryoRemaining.BackColor   = System.Drawing.Color.Transparent;
            chkEmbryoRemaining.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkEmbryoRemaining.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkEmbryoRemaining.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkEmbryoRemaining.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkEmbryoRemaining.Location    = new System.Drawing.Point(gapX, gapY);
            chkEmbryoRemaining.Name        = "chkEmbryoRemaining";
            chkEmbryoRemaining.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkEmbryoRemaining.Size        = new System.Drawing.Size(180, 24);
            chkEmbryoRemaining.TabIndex    = 553;
            chkEmbryoRemaining.Text        = "Embryo Remaining ";
            theme1.SetTheme(this.chkEmbryoRemaining, "(default)");
            chkEmbryoRemaining.UseVisualStyleBackColor = true;
            chkEmbryoRemaining.Value = null;
            chkEmbryoRemaining.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;
            chkEmbryoRemaining.Font = fEdit;
            txtEmbryoRemaining      = new C1TextBox();
            txtEmbryoRemaining.Font = fEdit;
            size = ic.MeasureString(chkSpermPrecaution);
            txtEmbryoRemaining.Location = new System.Drawing.Point(chkEmbryoRemaining.Location.X + chkEmbryoRemaining.Width, chkEmbryoRemaining.Location.Y);
            txtEmbryoRemaining.Size     = new Size(60, 20);
            txtEmbryoRemaining.Name     = "txtEmbryoRemaining";
            lbEmbryoRemaining           = new Label();
            lbEmbryoRemaining.Text      = "embryos ";
            lbEmbryoRemaining.Font      = fEdit;
            lbEmbryoRemaining.Location  = new System.Drawing.Point(txtPGSExtra.Location.X + txtPGSExtra.Width, chkPGS.Location.Y);
            lbEmbryoRemaining.AutoSize  = true;
            lbEmbryoRemaining.Name      = "lbEmbryoRemaining";

            gapY                     += gapLine;
            chkDiscardAll             = new C1.Win.C1Input.C1CheckBox();
            chkDiscardAll.Font        = fEdit;
            chkDiscardAll.Name        = "chkDiscardAll";
            chkDiscardAll.Text        = "Discard All Embryos ";
            chkDiscardAll.BackColor   = System.Drawing.Color.Transparent;
            chkDiscardAll.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
            chkDiscardAll.BorderStyle = System.Windows.Forms.BorderStyle.None;
            chkDiscardAll.FlatStyle   = System.Windows.Forms.FlatStyle.Flat;
            chkDiscardAll.ForeColor   = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
            chkDiscardAll.Location    = new System.Drawing.Point(gapX, gapY);
            chkDiscardAll.Padding     = new System.Windows.Forms.Padding(4, 1, 1, 1);
            chkDiscardAll.Size        = new System.Drawing.Size(180, 24);
            chkDiscardAll.TabIndex    = 553;
            theme1.SetTheme(this.chkDiscardAll, "(default)");
            chkDiscardAll.UseVisualStyleBackColor = true;
            chkDiscardAll.Value = null;
            chkDiscardAll.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            gapY                              += gapLine;
            lbStfId                            = new Label();
            lbStfId.Font                       = fEdit;
            lbStfId.Name                       = "lbStfId";
            lbStfId.Text                       = "Staff : ";
            lbStfId.Location                   = new System.Drawing.Point(gapX, gapY);
            lbStfId.AutoSize                   = true;
            cboStfId                           = new C1ComboBox();
            cboStfId.Font                      = fEdit;
            size                               = ic.MeasureString(lbStfId);
            cboStfId.Location                  = new System.Drawing.Point(cboPkg.Location.X, lbStfId.Location.Y);
            cboStfId.AllowSpinLoop             = false;
            cboStfId.BorderStyle               = System.Windows.Forms.BorderStyle.FixedSingle;
            cboStfId.DisabledForeColor         = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152)))));
            cboStfId.Font                      = fEdit;
            cboStfId.GapHeight                 = 0;
            cboStfId.ImagePadding              = new System.Windows.Forms.Padding(0);
            cboStfId.ItemsDisplayMember        = "";
            cboStfId.ItemsValueMember          = "";
            cboStfId.Name                      = "cboStfId";
            cboStfId.Size                      = new System.Drawing.Size(180, 20);
            cboStfId.Style.DropDownBackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            cboStfId.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro;
            cboStfId.Style.Font                = fEdit;
            cboStfId.TabIndex                  = 538;
            cboStfId.Tag                       = null;
            theme1.SetTheme(cboStfId, "(default)");
            cboStfId.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            gapY                              += gapLine;
            lbChkId                            = new Label();
            lbChkId.Font                       = fEdit;
            lbChkId.Text                       = "Check By : ";
            lbChkId.Name                       = "lbChkId";
            lbChkId.Location                   = new System.Drawing.Point(gapX, gapY);
            lbChkId.AutoSize                   = true;
            cboChkId                           = new C1ComboBox();
            cboChkId.Font                      = fEdit;
            cboChkId.Name                      = "cboChkId";
            size                               = ic.MeasureString(lbChkId);
            cboChkId.Location                  = new System.Drawing.Point(cboPkg.Location.X, lbChkId.Location.Y);
            cboChkId.AllowSpinLoop             = false;
            cboChkId.BorderStyle               = System.Windows.Forms.BorderStyle.FixedSingle;
            cboChkId.DisabledForeColor         = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152)))));
            cboChkId.Font                      = fEdit;
            cboChkId.GapHeight                 = 0;
            cboChkId.ImagePadding              = new System.Windows.Forms.Padding(0);
            cboChkId.ItemsDisplayMember        = "";
            cboChkId.ItemsValueMember          = "";
            cboChkId.Size                      = new System.Drawing.Size(180, 20);
            cboChkId.Style.DropDownBackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            cboChkId.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro;
            cboChkId.Style.Font                = fEdit;
            cboChkId.TabIndex                  = 538;
            cboChkId.Tag                       = null;
            theme1.SetTheme(cboChkId, "(default)");
            cboChkId.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue;

            gapY        += gapLine;
            btnSave      = new C1Button();
            btnSave.Font = fEdit;
            btnSave.Name = "btnLisStart";
            btnSave.Text = "Save";
            //size = bc.MeasureString(btnHnSearch);
            btnSave.Location   = new System.Drawing.Point(gapX, gapY);
            btnSave.Size       = new Size(70, 60);
            btnSave.Font       = fEdit;
            btnSave.Image      = imgStart;
            btnSave.TextAlign  = ContentAlignment.MiddleRight;
            btnSave.ImageAlign = ContentAlignment.MiddleLeft;

            //panel1.Controls.Add(chkNGS);
            panel1.Controls.Add(lbDate);
            panel1.Controls.Add(txtDate);
            panel1.Controls.Add(lbPkg);
            panel1.Controls.Add(cboPkg);
            panel1.Controls.Add(lbName);
            panel1.Controls.Add(txtName);
            panel1.Controls.Add(chkEmbryoFreezing);
            panel1.Controls.Add(txtEmbryoFreezing);
            panel1.Controls.Add(lbEmbryoFreezing);
            panel1.Controls.Add(txtEmbryoStraws);
            panel1.Controls.Add(lbEmbryoStraws);
            panel1.Controls.Add(txtEmbryoStrawsExtra);
            panel1.Controls.Add(lbEmbryoEmbryo);
            panel1.Controls.Add(chkNGS);
            panel1.Controls.Add(chkPGS);

            //panel1.Controls.Add(lbPGSEmbryo);
            panel1.Controls.Add(txtPGSEmbryo);
            panel1.Controls.Add(lbPGSEmbryo);
            panel1.Controls.Add(txtPGSExtra);
            panel1.Controls.Add(lbPGSExtra);
            panel1.Controls.Add(txtSpermSelection);
            panel1.Controls.Add(txtSpermPrecaution);
            panel1.Controls.Add(txtEmbryoRemaining);
            panel1.Controls.Add(lbEmbryoRemaining);

            panel1.Controls.Add(chkDay6);
            panel1.Controls.Add(chkHA);
            panel1.Controls.Add(chkSpermSelection);
            panel1.Controls.Add(chkSpermPrecaution);
            panel1.Controls.Add(chkEmbryoGlue);
            panel1.Controls.Add(chkEmbryoRemaining);
            panel1.Controls.Add(chkDiscardAll);
            panel1.Controls.Add(lbStfId);
            panel1.Controls.Add(cboStfId);
            panel1.Controls.Add(lbChkId);
            panel1.Controls.Add(cboChkId);
            panel1.Controls.Add(btnSave);
            this.Controls.Add(panel1);
            setTheme();

            panel1.ResumeLayout(false);

            panel1.PerformLayout();
            this.PerformLayout();
        }