private void initControl() { sB = new System.Windows.Forms.StatusStrip(); sB1 = new System.Windows.Forms.ToolStripStatusLabel(); panel1 = new System.Windows.Forms.Panel(); sB.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.sB1 }); sB.Dock = DockStyle.Bottom; sB.SuspendLayout(); panel1.SuspendLayout(); panel1.Dock = System.Windows.Forms.DockStyle.Fill; panel1.Location = new System.Drawing.Point(0, 0); Controls.Add(this.panel1); Controls.Add(this.sB); grfDept = new C1FlexGrid(); panel1.Controls.Add(grfDept); theme1 = new C1.Win.C1Themes.C1ThemeController(); theme1.Theme = "Office2013Red"; theme1.SetTheme(sB, "BeigeOne"); theme1.SetTheme(panel1, "BeigeOne"); C1ThemeController.ApplicationTheme = xC.iniC.themeApplication; theme1.Theme = C1ThemeController.ApplicationTheme; initGrfDept(); setGrfDeptH(); }
private void initGrfQueCaller() { grfQueCaller = new C1FlexGrid(); grfQueCaller.Font = fEdit; grfQueCaller.Dock = System.Windows.Forms.DockStyle.Fill; grfQueCaller.Location = new System.Drawing.Point(0, 0); theme1.SetTheme(sB1, "Office2016DarkGray"); grfQueCaller.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None; //FilterRow fr = new FilterRow(grfExpn); //grfVs.AfterRowColChange += GrfImg_AfterRowColChange; //grfVs.MouseDown += GrfImg_MouseDown; grfQueCaller.Click += GrfQueCaller_Click; grfQueCaller.CellChanged += GrfQueCaller_CellChanged; //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); ContextMenu menuGw = new ContextMenu(); //menuGw.MenuItems.Add("&แก้ไข รายการเบิก", new EventHandler(ContextMenu_edit)); //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Caller_Void)); grfQueCaller.ContextMenu = menuGw; pn1.Controls.Add(grfQueCaller); grfQueCaller.AllowSorting = AllowSortingEnum.None; pn1.Controls.Add(sB1); theme1.SetTheme(grfQueCaller, "Office2007Blue"); }
private void initGrfQueToday() { grfQueToday = new C1FlexGrid(); grfQueToday.Font = fEdit; grfQueToday.Dock = System.Windows.Forms.DockStyle.Fill; grfQueToday.Location = new System.Drawing.Point(0, 0); grfQueToday.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None; //FilterRow fr = new FilterRow(grfExpn); //grfVs.AfterRowColChange += GrfImg_AfterRowColChange; //grfVs.MouseDown += GrfImg_MouseDown; grfQueToday.Click += GrfQueToday_Click; //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); ContextMenu menuGw = new ContextMenu(); //menuGw.MenuItems.Add("&แก้ไข รายการเบิก", new EventHandler(ContextMenu_edit)); //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel));Office2016DarkGray grfQueToday.ContextMenu = menuGw; pn1.Controls.Add(grfQueToday); grfQueToday.AllowSorting = AllowSortingEnum.None; theme1.SetTheme(grfQueToday, bqc.iniC.themeApplication); }
private void initGrfProc() { grfProc = new C1FlexGrid(); grfProc.Font = fEdit; grfProc.Dock = System.Windows.Forms.DockStyle.Fill; grfProc.Location = new System.Drawing.Point(0, 0); //FilterRow fr = new FilterRow(grfExpn); //grfQue.AfterRowColChange += GrfReq_AfterRowColChange; //grfExpnC.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellButtonClick); //grfBillD.AfterDataRefresh += GrfBillD_AfterDataRefresh; //ContextMenu menuGw = new ContextMenu(); //menuGw.MenuItems.Add("ออก บิล", new EventHandler(ContextMenu_edit_bill)); //menuGw.MenuItems.Add("ส่งกลับ", new EventHandler(ContextMenu_send_back)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel)); //grfBillD.ContextMenu = menuGw; //grfBillD.SubtotalPosition = SubtotalPositionEnum.BelowData; pnProcess.Controls.Add(grfProc); theme1.SetTheme(grfProc, "Office2010Red"); //theme1.SetTheme(tabDiag, "Office2010Blue"); //theme1.SetTheme(tabFinish, "Office2010Blue"); }
private void setTheme() { foreach (Control c in this.Controls) { theme1.SetTheme(c, theme1.Theme); } }
private void initGrfStk() { grfStk = new C1FlexGrid(); grfStk.Font = fEdit; grfStk.Dock = System.Windows.Forms.DockStyle.Fill; grfStk.Location = new System.Drawing.Point(0, 0); grfStk.Rows.Count = 1; grfStk.Cols.Count = 6; //FilterRow2 fr = new FilterRow2(grfBloodLab); this.Load += FrmStockRecView_Load; grfStk.DoubleClick += GrfStk_DoubleClick; //grfExpnC.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellButtonClick); //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); ContextMenu menuGw = new ContextMenu(); //if (flagedit.Equals("edit")) //{ // menuGw.MenuItems.Add("สั่งการ", new EventHandler(ContextMenu_order_bl_set)); //} //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel)); grfStk.ContextMenu = menuGw; pnBody.Controls.Add(grfStk); theme1.SetTheme(grfStk, "Office2010Red"); }
private void initGrfQue() { grfQue = new C1FlexGrid(); grfQue.Font = fEdit; grfQue.Dock = System.Windows.Forms.DockStyle.Fill; grfQue.Location = new System.Drawing.Point(0, 0); //FilterRow fr = new FilterRow(grfExpn); grfQue.Click += GrfQue_Click; //grfVs.MouseDown += GrfImg_MouseDown; //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); pnQue.Controls.Add(grfQue); theme1.SetTheme(grfQue, "Office2016DarkGray"); }
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(); label2 = new System.Windows.Forms.Label(); txtPassword = new C1.Win.C1Input.C1TextBox(); theme1 = new C1.Win.C1Themes.C1ThemeController(); theme1.Theme = "Office2013Red"; //C1ThemeController.ApplicationTheme = ic.iniC.themeApplication; theme1.Theme = C1ThemeController.ApplicationTheme; stt = new C1SuperTooltip(); sep = new C1SuperErrorProvider(); 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 = "รหัสผ่าน :"; label2.AutoSize = true; label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); label2.Location = new System.Drawing.Point(10, label1.Top + 30); //label1.Size = new System.Drawing.Size(68, 16); label2.TabIndex = 1; label2.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", 11F, 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(label2); this.Controls.Add(txtPassword); }
private void initCompoment() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 130, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tcMain = new C1DockingTab(); tcMain.Dock = System.Windows.Forms.DockStyle.Fill; tcMain.Location = new System.Drawing.Point(0, 266); tcMain.Name = "tcMain"; tcMain.Size = new System.Drawing.Size(669, 200); tcMain.TabIndex = 0; tcMain.TabsSpacing = 5; tcMain.SelectedTabChanged += TcMain_SelectedTabChanged; tabOPBkk = new C1DockingTabPage(); tabOPBkk.Location = new System.Drawing.Point(1, 24); //tabScan.Name = "c1DockingTabPage1"; tabOPBkk.Size = new System.Drawing.Size(667, 175); tabOPBkk.TabIndex = 0; tabOPBkk.Text = "Vaccine"; tabOPBkk.Name = "tabVaccine"; tcMain.Controls.Add(tabOPBkk); tabOP = new C1DockingTabPage(); tabOP.Dock = System.Windows.Forms.DockStyle.Fill; tabOP.Name = "tabOP"; tabOP.Text = "OPBKK Main"; tcMain.Controls.Add(tabOP); grfSelect = new C1FlexGrid(); grfSelect.Font = fEdit; grfSelect.Dock = System.Windows.Forms.DockStyle.Fill; grfSelect.Location = new System.Drawing.Point(0, 0); grfSelect.Rows.Count = 1; grfSelect.Name = "grfSelect"; tabOPBkk.Controls.Add(grfSelect); theme1.SetTheme(grfSelect, "Office2010Red"); theme1.SetTheme(this, bc.iniC.themeApp); theme1.SetTheme(tcMain, bc.iniC.themeApp); this.Controls.Add(tcMain); }
private void initGrfQue() { grf = new C1FlexGrid(); grf.Font = fEdit; grf.Dock = System.Windows.Forms.DockStyle.Fill; grf.Location = new System.Drawing.Point(0, 0); //FilterRow fr = new FilterRow(grfExpn); pnQue.Controls.Add(grf); theme1.SetTheme(grf, "Office2016DarkGray"); }
private void FrmDocGroupFmEdit_Load(object sender, EventArgs e) { //throw new NotImplementedException(); scFmLeft.SizeRatio = 20; theme1 = new C1.Win.C1Themes.C1ThemeController(); theme1.SetTheme(grfLeft, bc.iniC.themeApplication); theme1.SetTheme(sCFm, bc.iniC.themeApplication); theme1.SetTheme(pnLeft, bc.iniC.themeApplication); theme1.SetTheme(pnRight, bc.iniC.themeApplication); theme1.SetTheme(pnRightTop, bc.iniC.themeApp); theme1.SetTheme(btnUpdate, bc.iniC.themeApp); theme1.SetTheme(btnFmCode, bc.iniC.themeApp); theme1.SetTheme(chkLimit, bc.iniC.themeApp); foreach (Control c in pnRightTop.Controls) { theme1.SetTheme(c, bc.iniC.themeApp); } }
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); } }
private void FrmDeport_Load(object sender, EventArgs e) { //throw new NotImplementedException(); this.Size = new Size(900, 900); this.FormBorderStyle = FormBorderStyle.FixedSingle; this.WindowState = FormWindowState.Normal; this.StartPosition = FormStartPosition.CenterScreen; this.Top = 100; this.Left = this.Left - 200; grfDeposit.Height = this.Height - 300; grfDeposit.Top = 130; grfWithDraw.Height = this.Height - 430; grfWithDraw.Top = 400; grfDepositHn.Height = this.Height - 430 - (txtWithDrawAmount.Location.Y + 35) - 140; grfDepositHn.Top = txtWithDrawAmount.Location.Y + 65; grfDepositHn.Width = this.Width - 20; if (flagCashier) { tcMain.TabPages[0].Visible = false; tcMain.ShowTabs = false; } theme1.SetTheme(lbtxtHn, this.theme1.Theme); theme1.SetTheme(lbtxtWithDrawHn, this.theme1.Theme); }
private void initGrfCheckup() { grfCheck = new C1FlexGrid(); grfCheck.Font = fEdit; grfCheck.Dock = System.Windows.Forms.DockStyle.Fill; grfCheck.Location = new System.Drawing.Point(0, 0); grfCheck.Rows.Count = 1; //FilterRow fr = new FilterRow(grfExpn); //grfHn.AfterRowColChange += GrfHn_AfterRowColChange; //grfVs.row //grfExpnC.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellButtonClick); //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); //menuGw.MenuItems.Add("&แก้ไข รายการเบิก", new EventHandler(ContextMenu_edit)); //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel)); pnGrd.Controls.Add(grfCheck); grfCheck.Rows.Count = 1; grfCheck.Cols.Count = 13; grfCheck.Cols[colCheckupRow].Caption = "ลำดับ"; grfCheck.Cols[colCheckupTilNum].Caption = "รูป"; grfCheck.Cols[colCheckupTilImgNum].Caption = "num"; grfCheck.Cols[colCheckupPID].Caption = "PID"; grfCheck.Cols[colCheckupPassport].Caption = "passport"; grfCheck.Cols[colCheckupNameE].Caption = "Name E"; grfCheck.Cols[colCheckupNameT].Caption = "Name T"; grfCheck.Cols[colCheckupDOB].Caption = "DOB"; grfCheck.Cols[colCheckupNat].Caption = "Nation"; grfCheck.Cols[colCheckupRow].Width = 50; grfCheck.Cols[colCheckupTilNum].Width = 50; grfCheck.Cols[colCheckupTilImgNum].Width = 50; grfCheck.Cols[colCheckupPID].Width = 100; grfCheck.Cols[colCheckupPassport].Width = 100; grfCheck.Cols[colCheckupNameE].Width = 200; grfCheck.Cols[colCheckupNameT].Width = 200; grfCheck.Cols[colCheckupDOB].Width = 120; grfCheck.Cols[colCheckupNat].Width = 200; grfCheck.Click += GrfCheck_Click; theme1.SetTheme(grfCheck, bc.iniC.themeApp); }
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(); }
private void initGrfStf() { grfStf = new C1FlexGrid(); grfStf.Font = fEdit; grfStf.Dock = System.Windows.Forms.DockStyle.Fill; grfStf.Location = new System.Drawing.Point(0, 0); grfStf.Rows.Count = 1; grfStf.DoubleClick += GrfStf_DoubleClick; //FilterRow fr = new FilterRow(grfExpn); //grfHn.AfterRowColChange += GrfHn_AfterRowColChange; //grfVs.row //grfExpnC.CellButtonClick += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellButtonClick); //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); //menuGw.MenuItems.Add("&แก้ไข รายการเบิก", new EventHandler(ContextMenu_edit)); //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel)); pnOrdSearchDrug.Controls.Add(grfStf); theme1.SetTheme(grfStf, "Office2010Red"); }
private void initGrfQue() { grfQue = new C1FlexGrid(); grfQue.Font = fEdit; grfQue.Dock = System.Windows.Forms.DockStyle.Fill; grfQue.Location = new System.Drawing.Point(0, 0); //FilterRow fr = new FilterRow(grfExpn); //grfVs.AfterRowColChange += GrfImg_AfterRowColChange; //grfVs.MouseDown += GrfImg_MouseDown; grfQue.Click += GrfQue_Click; grfQue.CellChanged += GrfQue_CellChanged; //grfExpnC.CellChanged += new C1.Win.C1FlexGrid.RowColEventHandler(this.grfDept_CellChanged); ContextMenu menuGw = new ContextMenu(); //menuGw.MenuItems.Add("&แก้ไข รายการเบิก", new EventHandler(ContextMenu_edit)); //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel)); grfQue.ContextMenu = menuGw; pn1.Controls.Add(grfQue); theme1.SetTheme(grfQue, "Office2016DarkGray"); }
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 initCompoment() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 150, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tcMain = new C1DockingTab(); tcMain.Dock = System.Windows.Forms.DockStyle.Fill; tcMain.Location = new System.Drawing.Point(0, 266); tcMain.Name = "tcMain"; //tcMain.Size = new System.Drawing.Size(669, 200); tcMain.TabIndex = 0; tcMain.TabsSpacing = 5; tcMain.ShowCaption = false; tabDeposit = new C1DockingTabPage(); tabDeposit.Location = new System.Drawing.Point(1, 24); //tabScan.Name = "c1DockingTabPage1"; tabDeposit.Size = new System.Drawing.Size(667, 175); tabDeposit.TabIndex = 0; tabDeposit.Text = "Template Drug"; tabDeposit.Name = "tabDeposit"; tcMain.Controls.Add(tabDeposit); lbcboDrugName = new Label(); lbtxtRemark = new Label(); lbtxtQty = new Label(); lbtxtThai = new Label(); lbtxtEng = new Label(); lbtxtDtrName = new Label(); txtRemark = new C1TextBox(); txtQty = new C1TextBox(); txtThai = new C1TextBox(); txtEng = new C1TextBox(); txtDtrName = new C1TextBox(); cboDrugName = new C1ComboBox(); lbcboTempDrugName = new Label(); txtTempDrugName = new C1TextBox(); txtId = new C1TextBox(); cboTempDrugName = new C1ComboBox(); btnNew = new C1Button(); btnSave = new C1Button(); ic.setControlLabel(ref lbcboTempDrugName, fEdit, "Template Name :", "lbtxtTempDrugName", gapX, gapY); //ic.setControlC1TextBox(ref txtTempDrugName, fEdit, "txtTempDrugName", 400, xCol2, gapY); ic.setControlC1ComboBox(ref cboTempDrugName, fEdit, "cboTempDrugName", 400, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtDtrName, fEdit, "Doctor Name :", "lbtxtDtrName", gapX, gapY); ic.setControlC1TextBox(ref txtDtrName, fEdit, "txtDtrName", 400, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbcboDrugName, fEdit, "Drug Name :", "lbcboDrugName", gapX, gapY); ic.setControlC1ComboBox(ref cboDrugName, "cboDrugName", 400, xCol2, gapY); cboDrugName.Font = fEdit; gapY += gapLine; ic.setControlLabel(ref lbtxtRemark, fEdit, "Remark :", "lbtxtRemark", gapX, gapY); ic.setControlC1TextBox(ref txtRemark, fEdit, "txtRemark", 400, xCol2, gapY); ic.setControlC1Button(ref btnNew, fEdit, "New", "btnNew", xCol4, gapY - 10); btnNew.Width = 70; gapY += gapLine; ic.setControlLabel(ref lbtxtThai, fEdit, "Thai :", "lbtxtThai", gapX, gapY); ic.setControlC1TextBox(ref txtThai, fEdit, "txtThai", 600, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtEng, fEdit, "English :", "lbtxtEng", gapX, gapY); ic.setControlC1TextBox(ref txtEng, fEdit, "txtEng", 600, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtQty, fEdit, "QTY :", "lbtxtQty", gapX, gapY); ic.setControlC1TextBox(ref txtQty, fEdit, "txtQty", 80, xCol2, gapY); txtQty.DataType = typeof(decimal); ic.setControlC1Button(ref btnSave, fEdit, "Save", "btnSave", xCol4, gapY); btnSave.Width = 70; grfDrug = new C1FlexGrid(); grfDrug.Name = "grfDeposit"; grfDrug.Font = fEdit; grfDrug.Dock = System.Windows.Forms.DockStyle.Bottom; grfDrug.Location = new System.Drawing.Point(0, 0); grfDrug.Rows.Count = 1; ContextMenu menuGw = new ContextMenu(); menuGw.MenuItems.Add("Void Drug", new EventHandler(ContextMenu_void_drug)); grfDrug.ContextMenu = menuGw; tabDeposit.Controls.Add(lbtxtDtrName); tabDeposit.Controls.Add(txtDtrName); tabDeposit.Controls.Add(lbcboDrugName); tabDeposit.Controls.Add(cboDrugName); tabDeposit.Controls.Add(lbtxtRemark); tabDeposit.Controls.Add(txtRemark); tabDeposit.Controls.Add(lbtxtThai); tabDeposit.Controls.Add(txtThai); tabDeposit.Controls.Add(lbtxtEng); tabDeposit.Controls.Add(txtEng); tabDeposit.Controls.Add(lbtxtQty); tabDeposit.Controls.Add(txtQty); tabDeposit.Controls.Add(btnSave); tabDeposit.Controls.Add(lbcboTempDrugName); tabDeposit.Controls.Add(cboTempDrugName); tabDeposit.Controls.Add(btnNew); tabDeposit.Controls.Add(grfDrug); this.Controls.Add(tcMain); theme1.SetTheme(lbcboDrugName, ic.theme); theme1.SetTheme(txtEng, ic.theme); Action <Control> setTheme = null; setTheme = (c) => { if (C1.Win.C1Themes.C1ThemeController.IsObjectThemeable(c)) { this.theme1.SetTheme(c, "Office2010Blue"); } foreach (Control cc in c.Controls) { setTheme(cc); } }; setTheme(this); }
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(); }
private void initCompoment() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 130, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tcMain = new C1DockingTab(); tcMain.Dock = System.Windows.Forms.DockStyle.Fill; tcMain.Location = new System.Drawing.Point(0, 266); tcMain.Name = "tcMain"; tcMain.Size = new System.Drawing.Size(669, 200); tcMain.TabIndex = 0; tcMain.TabsSpacing = 5; tabImportDf = new C1DockingTabPage(); tabImportDf.Dock = System.Windows.Forms.DockStyle.Fill; tabImportDf.Name = "tabImportDf"; tabImportDf.Text = "Import Item DF"; grfSelect = new C1FlexGrid(); grfSelect.Font = fEdit; grfSelect.Dock = System.Windows.Forms.DockStyle.Bottom; grfSelect.Location = new System.Drawing.Point(0, 0); grfSelect.Rows.Count = 1; lbDateStart = new Label(); txtDateStart = new C1DateEdit(); btnDeleteAll = new C1Button(); cboDocGrp = new C1ComboBox(); txtPaidType = new C1TextBox(); lbHn = new Label(); txtHn = new C1TextBox(); btnPrint = new C1Button(); btnGet = new C1Button(); bc.setControlLabel(ref lbDateStart, fEdit, "วันที่เริ่มต้น :", "lbDateStart", gapX, gapY); size = bc.MeasureString(lbDateStart); bc.setControlC1DateTimeEdit(ref txtDateStart, "txtDateStart", lbDateStart.Location.X + size.Width + 5, gapY); bc.setControlC1ComboBox(ref cboDocGrp, "cboDocGrp", 80, txtDateStart.Location.X + txtDateStart.Width + 25, gapY); cboDocGrp.Font = fEdit; ComboBoxItem item = new ComboBoxItem(); item = new ComboBoxItem(); item.Value = "1"; item.Text = "รอบ 1"; cboDocGrp.Items.Add(item); item = new ComboBoxItem(); item.Value = "2"; item.Text = "รอบ 2"; cboDocGrp.Items.Add(item); item = new ComboBoxItem(); item.Value = "3"; item.Text = "รอบ 3"; cboDocGrp.Items.Add(item); //item = new ComboBoxItem(); //item.Value = "3"; //item.Text = "รอบ 3"; //cboDocGrp.Items.Add(item); bc.setControlC1TextBox(ref txtPaidType, fEdit, "txtPaidType", 140, cboDocGrp.Location.X + cboDocGrp.Width + 25, gapY); bc.setControlLabel(ref lbHn, fEdit, "search :", "lbHn", txtPaidType.Location.X + txtPaidType.Width + 55, gapY); size = bc.MeasureString(lbHn); bc.setControlC1TextBox(ref txtHn, fEdit, "txtHn", 140, lbHn.Location.X + lbHn.Width + 10, gapY); bc.setControlC1Button(ref btnDeleteAll, fEdit, "Clear Data", "btnDeleteAll", txtHn.Location.X + txtHn.Width + 20, gapY); btnDeleteAll.Width = 120; btnDeleteAll.Height = btnDeleteAll.Height + 10; bc.setControlC1Button(ref btnPrint, fEdit, "Print", "btnPrint", btnDeleteAll.Location.X + btnDeleteAll.Width + 60, gapY); btnPrint.Width = 140; btnPrint.Height = btnPrint.Height + 10; bc.setControlC1Button(ref btnGet, fEdit, "get", "btnGet", btnPrint.Location.X + btnPrint.Width + 60, gapY); btnGet.Width = 140; btnGet.Height = btnGet.Height + 10; tabImportDf.Controls.Add(grfSelect); theme1.SetTheme(grfSelect, "Office2010Red"); tabImportDf.Controls.Add(lbDateStart); tabImportDf.Controls.Add(txtDateStart); tabImportDf.Controls.Add(cboDocGrp); tabImportDf.Controls.Add(btnDeleteAll); tabImportDf.Controls.Add(btnPrint); tabImportDf.Controls.Add(txtPaidType); tabImportDf.Controls.Add(lbHn); tabImportDf.Controls.Add(txtHn); tabImportDf.Controls.Add(btnGet); tcMain.Controls.Add(tabImportDf); this.Controls.Add(tcMain); }
private void setTheme1(String theme) { //theme1.SetTheme(grf, "BeigeOne"); theme1.SetTheme(btnQueNext, theme); theme1.SetTheme(c1Button1, theme); theme1.SetTheme(btnQueSend, theme); theme1.SetTheme(c1StatusBar1, theme); theme1.SetTheme(cboQueDate, theme); theme1.SetTheme(chkQueVoid, theme); theme1.SetTheme(btnQueVoid, theme); theme1.SetTheme(chkQueSend, theme); theme1.SetTheme(this, theme); }
private void initCompoment() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 130, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tcMain = new C1DockingTab(); tcMain.Dock = System.Windows.Forms.DockStyle.Fill; tcMain.Location = new System.Drawing.Point(0, 266); tcMain.Name = "tcMain"; tcMain.Size = new System.Drawing.Size(669, 200); tcMain.TabIndex = 0; tcMain.TabsSpacing = 5; tabImportDf = new C1DockingTabPage(); tabImportDf.Dock = System.Windows.Forms.DockStyle.Fill; tabImportDf.Name = "tabImportDf"; tabImportDf.Text = "Import Item DF"; grfSelect = new C1FlexGrid(); grfSelect.Font = fEdit; grfSelect.Dock = System.Windows.Forms.DockStyle.Bottom; grfSelect.Location = new System.Drawing.Point(0, 0); grfSelect.Rows.Count = 1; lbDateStart = new Label(); txtDateStart = new C1DateEdit(); lbDateEnd = new Label(); txtDateEnd = new C1DateEdit(); lbtxtPaidType = new Label(); txtPaidType = new C1TextBox(); btnImportDfSelect = new C1Button(); btnImportDfGen = new C1Button(); lbLoading = new Label(); lbLoading.Font = fEdit5B; lbLoading.BackColor = Color.WhiteSmoke; lbLoading.ForeColor = Color.Black; lbLoading.AutoSize = false; lbLoading.Size = new Size(300, 60); bc.setControlLabel(ref lbDateStart, fEdit, "วันที่เริ่มต้น :", "lbDateStart", gapX, gapY); size = bc.MeasureString(lbDateStart); bc.setControlC1DateTimeEdit(ref txtDateStart, "txtDateStart", lbDateStart.Location.X + size.Width + 5, gapY); size = bc.MeasureString(lbDateStart); //bc.setControlC1DateTimeEdit(ref txtDateStart, "txtDateStart", lbDateStart.Location.X + size.Width + 5, gapY); bc.setControlLabel(ref lbDateEnd, fEdit, "วันที่สิ้นสุด :", "lbDateEnd", txtDateStart.Location.X + txtDateStart.Width + 15, gapY); size = bc.MeasureString(lbDateEnd); bc.setControlC1DateTimeEdit(ref txtDateEnd, "txtDateEnd", lbDateEnd.Location.X + size.Width + 5, gapY); bc.setControlLabel(ref lbtxtPaidType, fEdit, "สิทธิ (xx,...) :", "lbtxtPaidType", txtDateEnd.Location.X + txtDateEnd.Width + 15, gapY); size = bc.MeasureString(lbtxtPaidType); bc.setControlC1TextBox(ref txtPaidType, fEdit, "txtPaidType", 120, lbtxtPaidType.Location.X + size.Width + 5, gapY); bc.setControlC1Button(ref btnImportDfSelect, fEdit, "ดึงข้อมูล", "btnSelect", txtPaidType.Location.X + txtPaidType.Width + 20, gapY); btnImportDfSelect.Width = 70; bc.setControlC1Button(ref btnImportDfGen, fEdit, "gen Text", "btnGen", btnImportDfSelect.Location.X + btnImportDfSelect.Width + 20, gapY); btnImportDfGen.Width = 80; tabImportDf.Controls.Add(grfSelect); theme1.SetTheme(grfSelect, "Office2010Red"); tabImportDf.Controls.Add(lbDateStart); tabImportDf.Controls.Add(txtDateStart); tabImportDf.Controls.Add(lbDateEnd); tabImportDf.Controls.Add(txtDateEnd); tabImportDf.Controls.Add(lbtxtPaidType); tabImportDf.Controls.Add(txtPaidType); tabImportDf.Controls.Add(btnImportDfSelect); tabImportDf.Controls.Add(btnImportDfGen); tcMain.Controls.Add(tabImportDf); this.Controls.Add(lbLoading); this.Controls.Add(tcMain); }
private void InitComponent() { int gapY = 30, gapX = 20, gapLine = 5, gapColName = 70; Size size = new Size(); theme1 = new C1ThemeController(); theme1.Theme = ic.iniC.themeApplication; pnTop = new Panel(); pnTop.Dock = DockStyle.Top; pnTop.Size = new Size(20, 60); pnBody = new Panel(); pnBody.Dock = DockStyle.Fill; pnTop.SuspendLayout(); pnBody.SuspendLayout(); this.SuspendLayout(); lbYear = new Label(); lbYear.Text = "Year :"; lbYear.Font = fEdit; lbYear.Location = new System.Drawing.Point(gapX, gapLine); lbYear.AutoSize = true; lbYear.Name = "lbYear"; size = ic.MeasureString(lbYear); cboYear = new C1ComboBox(); cboYear.AllowSpinLoop = false; cboYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboYear.Font = fEdit; cboYear.GapHeight = 0; cboYear.ImagePadding = new System.Windows.Forms.Padding(0); cboYear.ItemsDisplayMember = ""; cboYear.ItemsValueMember = ""; cboYear.Location = new System.Drawing.Point(size.Width + 20, lbYear.Location.Y); cboYear.Name = "cboYear"; cboYear.Size = new System.Drawing.Size(184, 20); cboYear.TabIndex = 562; cboYear.Tag = null; theme1.SetTheme(cboYear, "(default)"); cboYear.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboYear.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboYear.Location = new Point(gapColName, lbYear.Location.Y); btnNew = new C1Button(); btnNew.Name = "btnNew"; btnNew.Text = "New 2019"; btnNew.Font = this.fEdit; size = ic.MeasureString(btnNew); btnNew.Size = new Size(100, 40); btnNew.Location = new Point(cboYear.Location.X + cboYear.Width + 40, lbYear.Location.Y); btnNew.Click += BtnNew_Click; btnSave = new C1Button(); btnSave.Name = "btnSave"; btnSave.Text = "Save 2019"; btnSave.Font = this.fEdit; size = ic.MeasureString(btnSave); btnSave.Size = new Size(100, 40); btnSave.Location = new Point(btnNew.Location.X + btnNew.Width + 40, lbYear.Location.Y); btnSave.Click += BtnSave_Click; tC1 = new C1DockingTab(); tC1.Dock = System.Windows.Forms.DockStyle.Fill; tC1.HotTrack = true; tC1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; tC1.TabSizeMode = C1.Win.C1Command.TabSizeModeEnum.Fit; tC1.TabsShowFocusCues = true; tC1.Alignment = TabAlignment.Top; tC1.SelectedTabBold = true; tC1.Name = "tC1"; tC1.CanCloseTabs = true; tab2019 = new C1DockingTabPage(); tC1.SuspendLayout(); tab2019.SuspendLayout(); tab2019.Name = "tabOnhand"; tab2019.TabIndex = 0; tab2019.Text = "Onhand"; theme1.SetTheme(tC1, ic.theme); pnTop.Controls.Add(lbYear); pnTop.Controls.Add(cboYear); pnTop.Controls.Add(lbStkSubName); //pnTop.Controls.Add(cboStkSubName); pnTop.Controls.Add(btnNew); pnTop.Controls.Add(btnSave); this.Controls.Add(pnBody); this.Controls.Add(pnTop); tC1.Controls.Add(tab2019); pnBody.Controls.Add(tC1); theme1.SetTheme(pnBody, ic.iniC.themeApp); theme1.SetTheme(pnTop, "Office2010Red"); pnTop.ResumeLayout(false); pnBody.ResumeLayout(false); tC1.ResumeLayout(false); tab2019.ResumeLayout(false); this.ResumeLayout(false); pnBody.PerformLayout(); pnTop.PerformLayout(); tC1.PerformLayout(); tab2019.PerformLayout(); this.PerformLayout(); }
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(); }