Beispiel #1
0
        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 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);
        }