Beispiel #1
0
 public ParamControl(int x, int y, string s, Control parent, int txtbox_extend = -1)
 {
     this.label = ControlFactory.Create <Label>(new Point(x, y), new Size(35, 12), s, s, 0);  parent.Controls.Add(this.label);
     txt        = new TextBox(); if (txtbox_extend > 0)
     {
         this.txt.Location = new Point(x, y + 20);               this.txt.Size = new Size(txtbox_extend, 19);
     }
     else
     {
         this.txt.Location = new Point(x + 60, y);
         this.txt.Size     = new Size(70, 19);
     }
     this.txt.Name = "txt_" + s;            this.txt.TabIndex = 1;            parent.Controls.Add(this.txt);            //             parent.ResumeLayout(false);            ToolTip t = new ToolTip();            t.SetToolTip(txt, "ここに説明");
 }
Beispiel #2
0
        //Tab2.Line8~12の初期化
        private void InitializeTab3()
        {
            Size deflabelsize       = new Size(35, 12);
            int  LineParamYStart    = 25;
            int  LineParamXInterval = 150;

            for (int i = 0; i < 2; i++)
            {
                labels.Add(ControlFactory.Create <Label>(new Point(LineParamXInterval * i, LineParamYStart)
                                                         , deflabelsize, "Line" + (i + 8).ToString(), null, 0));
                tabPage3.Controls.Add(labels.Last());
            }
            LineParamYStart += 25;
            for (int i = 0; i < line8param.Count(); i++)
            {
                param.Add(new ParamControl(0, LineParamYStart + i * 20, line8param[i], this.tabPage3));
            }

            //Line9は特殊
            param.Add(new ParamControl(LineParamXInterval, LineParamYStart, line9param[0], this.tabPage3));
            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20, line9param[1], this.tabPage3, 300));

            //Line10も特殊
            labels.Add(ControlFactory.Create <Label>(new Point(LineParamXInterval, LineParamYStart + 20 * 3 + 5)
                                                     , deflabelsize, "Line10", null, 0));
            tabPage3.Controls.Add(labels.Last());

            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20 * 3 + 30, line10param[0], this.tabPage3));
            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20 * 4 + 30, line10param[1], this.tabPage3, 300));

            //Line11も(ry
            labels.Add(ControlFactory.Create <Label>(new Point(LineParamXInterval, LineParamYStart + 20 * 8 + 5)
                                                     , deflabelsize, "Line11", null, 0));
            tabPage3.Controls.Add(labels.Last());

            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20 * 8 + 30, line11param[0], this.tabPage3));
            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20 * 9 + 30, line11param[1], this.tabPage3, 300));
            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20 * 11 + 35, line11param[2], this.tabPage3));
            param.Add(new ParamControl(LineParamXInterval, LineParamYStart + 20 * 12 + 35, line11param[3], this.tabPage3, 300));

            //Line12はLine8の下に持ってくる
            labels.Add(ControlFactory.Create <Label>(new Point(0, LineParamYStart + 20 * line8param.Count() + 25)
                                                     , deflabelsize, "Line12", null, 0));
            tabPage3.Controls.Add(labels.Last());
            for (int i = 0; i < line12param.Count(); i++)
            {
                param.Add(new ParamControl(0, LineParamYStart + (i + line8param.Count()) * 20 + 50, line12param[i], this.tabPage3));
            }
        }
Beispiel #3
0
        public ValueControl(int x, int y, string s, Control parent, int txtbox_extend = -1)
        {
            this.label = ControlFactory.Create <Label>(new Point(x, y), new Size(35, 12), s, s, 0);

            if (txtbox_extend > 0)
            {
                this.txt = ControlFactory.Create <TextBox>(new Point(x, y + 20),
                                                           new Size(txtbox_extend, 19), "txt_" + s, "txt_" + s, 1);
            }
            else
            {
                this.txt = ControlFactory.Create <TextBox>(new Point(x + 60, y),
                                                           new Size(70, 19), "txt_" + s, "txt_" + s, 1);
            }
            parent.Controls.Add(this.label);
            parent.Controls.Add(this.txt);
            //
            parent.ResumeLayout(false);
        }
Beispiel #4
0
        //ボタンとか
        private void InitializeButtons()
        {
            Size defsize = new Size(100, 30);

            for (int i = 0; i < 3; i++)
            {
                bts.Add(ControlFactory.CreateButton(new Point(360, 460), defsize,
                                                    "Create BTinp.dat", "bt_BTinpCreate", new EventHandler(this.CreateBTinp), 1));
                tabControl1.TabPages["tabPage" + (i + 1)].Controls.Add(bts.Last());

                bts.Add(ControlFactory.CreateButton(new Point(240, 460), defsize,
                                                    "Cancel", "bt_BTinpCancel", new EventHandler(this.Cancel), 1));
                tabControl1.TabPages["tabPage" + (i + 1)].Controls.Add(bts.Last());

                bts.Add(ControlFactory.CreateButton(new Point(120, 460), defsize,
                                                    "Read File", "bt_BTinpRead", new EventHandler(this.ReadFile), 1));
                tabControl1.TabPages["tabPage" + (i + 1)].Controls.Add(bts.Last());
            }
        }
Beispiel #5
0
        //Tab2.Line5~7(6a含む)の初期化
        private void InitializeTab2()
        {
            Size deflabelsize       = new Size(35, 12);
            int  LineParamYStart    = 25;
            int  LineParamXInterval = 150;

            for (int i = 0; i < 3; i++)
            {
                labels.Add(ControlFactory.Create <Label>(new Point(LineParamXInterval * i, LineParamYStart)
                                                         , deflabelsize, "Line" + (i + 5).ToString(), null, 0));
                tabPage2.Controls.Add(labels.Last());
            }
            LineParamYStart += 25;
            for (int i = 0; i < line5param.Count(); i++)
            {
                param.Add(new ParamControl(0, LineParamYStart + i * 20, line5param[i], this.tabPage2));
            }
            for (int i = 0; i < line6param.Count(); i++)
            {
                param.Add(new ParamControl(LineParamXInterval, LineParamYStart + i * 20, line6param[i], this.tabPage2));
            }
            //Line6a


            labels.Add(ControlFactory.Create <Label>(new Point(LineParamXInterval * 2, 5 + line7param.Count() * 20 + LineParamYStart)
                                                     , deflabelsize, "Line6a", null, 0));
            tabPage2.Controls.Add(labels.Last());

            for (int i = 0; i < line6aparam.Count(); i++)
            {
                param.Add(new ParamControl(LineParamXInterval * 2, 30 + line7param.Count() * 20 + LineParamYStart + i * 20, line6aparam[i], this.tabPage2));
                param.Last().Enable(false);
            }
            for (int i = 0; i < line7param.Count(); i++)
            {
                param.Add(new ParamControl(LineParamXInterval * 2, LineParamYStart + i * 20, line7param[i], this.tabPage2));
            }
        }
Beispiel #6
0
        //Tab1,Line1~4の初期化
        private void InitializeTab1()
        {
            Size deflabelsize = new Size(35, 12);

            labels.Add(ControlFactory.Create <Label>(
                           new Point(5, 5), deflabelsize, "Line1:Comment", "Comment", 0));
            tabPage1.Controls.Add(labels.Last());

            txts.Add(ControlFactory.Create <TextBox>(
                         new Point(5, 25), new Size(460, 19), "", "CommentBox", 1));
            tabPage1.Controls.Add(txts.Last());

            int LineParamYStart    = 55;
            int LineParamXInterval = 150;

            for (int i = 0; i < 3; i++)
            {
                labels.Add(ControlFactory.Create <Label>(new Point(LineParamXInterval * i, LineParamYStart)
                                                         , deflabelsize, "Line" + (i + 2).ToString(), null, 0));
                tabPage1.Controls.Add(labels.Last());
            }

            LineParamYStart += 25;
            for (int i = 0; i < line2param.Count(); i++)
            {
                param.Add(new ParamControl(0, LineParamYStart + i * 20, line2param[i], this.tabPage1));
            }
            for (int i = 0; i < line3param.Count(); i++)
            {
                param.Add(new ParamControl(LineParamXInterval, LineParamYStart + i * 20, line3param[i], this.tabPage1));
            }
            for (int i = 0; i < line4param.Count(); i++)
            {
                param.Add(new ParamControl(LineParamXInterval * 2, LineParamYStart + i * 20, line4param[i], this.tabPage1));
            }
        }