示例#1
0
        public override Panel CreatePanel(TEnvironment environment)
        {
            Panel       ret = new Panel();
            RadioButton r   = new RadioButton();

            ret.Height = _RadioTexts.Count * r.Height + 24;
            GroupBox group = new GroupBox();

            group.Text = ParamName;
            group.Dock = DockStyle.Fill;
            if (Value < 0 || Value >= _RadioTexts.Count)
            {
                Value = 0;
            }
            int count = 0;

            foreach (var text in _RadioTexts)
            {
                int         value = count;
                RadioButton radio = new RadioButton();
                radio.Text            = text;
                radio.CheckedChanged += new EventHandler((s, e) => {
                    Value = value;
                    DoValueChanged();
                });
                radio.Checked = count == Value;
                radio.Dock    = DockStyle.Top;
                group.Controls.Add(radio);
                radio.BringToFront();
                count++;
            }
            ret.Controls.Add(group);
            return(ret);
        }
示例#2
0
        private void Lang_AddRadioButton(string lang)
        {
            RadioButton RB = Lang_CreateRadioButton(lang);

            Controls.Add(RB);
            RB.BringToFront();
        }
        private void LoadTree(AdapterConfiguration a)
        {
            List <Control> tempList = new List <Control>();

            foreach (var p in a.Plugins.Plugins)
            {
                if (p is ISessionable)
                {
                    RadioButton b = new RadioButton()
                    {
                        Text = p.Name,
                        Tag  = p,
                        Dock = DockStyle.Top
                    };
                    b.BringToFront();
                    b.CheckedChanged += OnCheckedChanged;

                    placeHolder.Controls.Add(b);
                    tempList.Add(b);

                    var option = new PluginOptions();
                    option.ModeSelectionEnabled = false;

                    _sessionFiles[p] = option;
                }
            }

            foreach (var c in tempList)
            {
                c.BringToFront();
            }
        }
示例#4
0
        private void AddItem(Item item)
        {
            RadioButton r = new RadioButton();

            r.Text = item.Text;
            r.Tag  = item.Key;
            this.Controls.Add(r);
            r.Dock = DockStyle.Top;
            r.BringToFront();
        }
示例#5
0
        private void ChangeShift(RadioButton rb1, RadioButton rb2)
        {
            rb1.BringToFront(); rb2.BringToFront();
            rb1.Checked = true;

            FadeColor(btntab2, silver);
            FadeColor(btntab3, gray);
            FadeColor(btntab4, dgray);
            FadeColor(btntab5, egray);

            RunAccentBar(btntab1, panel1.BackColor);
            InitializeTransition();
        }
示例#6
0
        public void addRadio(string title)
        {
            RadioButton rb = new RadioButton();

            rb.AutoSize   = false;
            rb.Dock       = DockStyle.Left;
            rb.Name       = title;
            rb.Appearance = Appearance.Button;
            rb.CheckAlign = ContentAlignment.MiddleCenter;
            rb.FlatAppearance.BorderSize = 0;
            rb.FlatStyle = FlatStyle.Flat;
            rb.Font      = titleFont;
            rb.ForeColor = foreColor;
            rb.Text      = title;
            rb.TextAlign = ContentAlignment.MiddleCenter;
            topPanel.Controls.Add(rb);
            rb.BringToFront();
        }
示例#7
0
 public void ShowSmOptInOverlay()
 {
     DarkenInstaller();
     smOptInText.Visible = true;
     smOptInBg.Visible   = true;
     smOptShown          = true;
     darkenProductOverlay.Controls.Add(smOptInBg);
     darkenProductOverlay.Controls.Add(smOptInY);
     darkenProductOverlay.Controls.Add(smOptInN);
     darkenProductOverlay.Controls.Add(smOptInText);
     smOptInText.BringToFront();
     smOptInY.BringToFront();
     smOptInN.BringToFront();
     smOptInY.ForeColor = Color.FromArgb(0, 0, 0);
     smOptInY.BackColor = Color.FromArgb(232, 232, 232);
     smOptInN.ForeColor = Color.FromArgb(0, 0, 0);
     smOptInN.BackColor = Color.FromArgb(232, 232, 232);
     darkenProductOverlay.BringToFront();
 }
示例#8
0
        private void LoadListItem()
        {
            var h = 0;

            foreach (ParameterItemListValueVm o in _objParamItem.GetParamtemList())
            {
                var opt = new RadioButton()
                {
                    Name = o.name, Text = o.title, Checked = o.@default, Dock = DockStyle.Top, AutoSize = false, Width = GbParamItem.Width
                };
                opt.CheckedChanged += CheckChanged;
                if (opt.Checked)
                {
                    _objParamItem.AddParamItemValue(opt.Name, opt.Text, opt.Checked);
                }
                GbParamItem.Controls.Add(opt);
                opt.BringToFront();
                h = h + opt.PreferredSize.Height + 10;
            }
            Panel1.Size      = new Size(Panel1.Width, h + 20);
            GbParamItem.Size = new Size(GbParamItem.Width, h + 10);
            Size             = new Size(Width, h + 30);
        }
示例#9
0
        private void loadShanuLabelDesign()
        {
            try
            {
                switch (gParam[0])
                {
                case "System.Windows.Forms.DataGridView":     //현재화면 사용가능여부 조회
                {
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);

                    System.Drawing.Color RowsBackColor = new System.Drawing.Color();
                    RowsBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[12]);

                    System.Drawing.Color AlternatebackColor = new System.Drawing.Color();
                    AlternatebackColor = System.Drawing.ColorTranslator.FromHtml(gParam[13]);

                    System.Drawing.Color HeaderColor = new System.Drawing.Color();
                    HeaderColor = System.Drawing.ColorTranslator.FromHtml(gParam[14]);

                    DataGridView ctrl = new DataGridView();
                    //ctrl.Image = global::DragObject.Properties.Resources.Sunset;
                    ctrl.BackColor         = myBackColor;
                    ctrl.Name              = gParam[10];
                    ctrl.Location          = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Size              = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    ctrl.RowHeadersVisible = false;
                    ctrl.RowsDefaultCellStyle.BackColor = RowsBackColor;
                    ////ctrl.BackgroundColor = RowsBackColor;
                    //////GridColumnStylesCollection Alternate Rows Backcolr
                    ////ctrl.AlternatingRowsDefaultCellStyle.BackColor = AlternatebackColor;
                    ////ctrl.RowsDefaultCellStyle.BackColor = RowsBackColor;
                    //////Column Header back Color
                    ////ctrl.ColumnHeadersDefaultCellStyle.BackColor = HeaderColor;

                    ctrl.BackgroundColor = myBackColor;

                    ctrl.RowsDefaultCellStyle.BackColor = Color.White;

                    //GridColumnStylesCollection Alternate Rows Backcolr
                    ctrl.AlternatingRowsDefaultCellStyle.BackColor = AlternatebackColor;

                    //Column Header back Color
                    ctrl.ColumnHeadersDefaultCellStyle.BackColor = HeaderColor;
                    ctrl.ColumnHeadersHeight = 30;

                    //////ctrl.AutoGenerateColumns = false;
                    ctrl.EnableHeadersVisualStyles = false;

                    // Enable the row header
                    ctrl.RowHeadersVisible = false;

                    // to Hide the Last Empty row here we use false.
                    ctrl.AllowUserToAddRows = false;
                    pnlMain.Controls.Add(ctrl);
                    //  ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.Label":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);
                    Label ctrl = new Label();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    //  ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.Button":
                {
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    Button ctrl = new Button();
                    //ctrl.Image = global::DragObject.Properties.Resources.Sunset;
                    ctrl.BackColor = myBackColor;
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    ctrl.Click += new EventHandler(control_Click);
                    pnlMain.Controls.Add(ctrl);
                    //  ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.ComboBox":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);
                    ComboBox ctrl = new ComboBox();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    // ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.ListBox":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);
                    ListBox ctrl = new ListBox();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    // ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.Panel":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    Panel ctrl = new Panel();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    ctrl.SendToBack();
                    pnlMain.Controls.Add(ctrl);
                    //    ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.NumericUpDown":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    NumericUpDown ctrl = new NumericUpDown();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    // ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.TreeView":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    TreeView ctrl = new TreeView();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    //  ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.DateTimePicker":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    DateTimePicker ctrl = new DateTimePicker();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    //  ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.TextBox":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    TextBox ctrl = new TextBox();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    // ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.RadioButton":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    RadioButton ctrl = new RadioButton();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    // ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.CheckBox":     //현재화면 사용가능여부 조회
                {
                    var cvt = new FontConverter();
                    //string s = cvt.ConvertToString(this.Font);
                    Font f = StringToFont(gParam[6]);        // cvt.ConvertFromString(gParam[6]) as Font;
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    System.Drawing.Color myForeColorColor = new System.Drawing.Color();
                    myForeColorColor = System.Drawing.ColorTranslator.FromHtml(gParam[9]);

                    CheckBox ctrl = new CheckBox();
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.Text      = gParam[5];
                    ctrl.Font      = f;
                    ctrl.BackColor = myBackColor;
                    ctrl.ForeColor = myForeColorColor;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    pnlMain.Controls.Add(ctrl);
                    // ComboControlNames.Items.Add(gParam[10]);
                }
                break;

                case "System.Windows.Forms.PictureBox":     //현재화면 사용가능여부 조회
                {
                    System.Drawing.Color myBackColor = new System.Drawing.Color();
                    myBackColor = System.Drawing.ColorTranslator.FromHtml(gParam[8]);
                    PictureBox ctrl = new PictureBox();
                    //ctrl.Image = global::DragObject.Properties.Resources.Sunset;

                    ctrl.BackColor = myBackColor;
                    ctrl.Name      = gParam[10];
                    ctrl.Location  = new Point(System.Convert.ToInt32(gParam[1]), System.Convert.ToInt32(gParam[2]));
                    ctrl.SizeMode  = PictureBoxSizeMode.StretchImage;
                    ctrl.Size      = new System.Drawing.Size(System.Convert.ToInt32(gParam[3]), System.Convert.ToInt32(gParam[4]));

                    if (gParam[7] != "")
                    {
                        Bitmap bmp1 = new Bitmap(new MemoryStream(Convert.FromBase64String(gParam[7])));
                        ctrl.Image = bmp1;
                    }
                    if (gParam[11] == "Front")
                    {
                        ctrl.BringToFront();
                    }
                    else
                    {
                        ctrl.SendToBack();
                    }
                    ctrl.SendToBack();
                    pnlMain.Controls.Add(ctrl);
                    ctrl.SendToBack();
                    //  ComboControlNames.Items.Add(gParam[10]);
                }
                break;
                }
            }
            catch (Exception ex)
            {
            }
        }
        public ucDataItemAdd(string dbName, int index, FieldInfo field, IDataFile db, IDataFieldEvent _fe)
        {
            int wi_Name = 110, wi_Max = 630, wi_ = 200;

            _Height = Height_Min;
            _Width  = wi_ + wi_Name + 8;
            string caption  = string.IsNullOrEmpty(field.CAPTION) ? field.NAME : field.CAPTION;
            Label  lbl_Name = new Label()
            {
                Dock = DockStyle.Left, Left = 4, Top = 0, Text = caption, AutoSize = false, Width = wi_Name, ForeColor = Color.Black, TextAlign = ContentAlignment.TopRight
            };

            this.Controls.Add(lbl_Name);

            if (field.TYPE_NAME == typeof(Byte).Name && field.KIT != ControlKit.CHECK)
            {
                ComboBox cbo = new ComboBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, DropDownStyle = ComboBoxStyle.DropDownList, Tag = field,
                };
                for (int k = 0; k < 256; k++)
                {
                    cbo.Items.Add(k.ToString());
                }
                cbo.SelectedIndex = 0;
                this.Controls.Add(cbo);
                cbo.BringToFront();
                return;
            }

            #region

            switch (field.KIT)
            {
            case ControlKit.LABEL:
                Label lbl = new Label()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, AutoSize = false, Width = wi_, Height = _Height - 5, BackColor = SystemColors.Control, Tag = field,
                };
                this.Controls.Add(lbl);
                lbl.BringToFront();
                break;

            case ControlKit.CHECK:
                CheckBox chk = new CheckBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Tag = field,
                };
                this.Controls.Add(chk);
                chk.BringToFront();
                break;

            case ControlKit.RADIO:
                RadioButton radio = new RadioButton()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Tag = field,
                };
                this.Controls.Add(radio);
                radio.BringToFront();
                break;

            case ControlKit.COLOR:
                Label lbl_Color = new Label()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, AutoSize = false, Width = 44, Height = _Height - 5, BackColor = Color.Gray, Tag = field,
                };
                this.Controls.Add(lbl_Color);
                lbl_Color.BringToFront();
                break;

            case ControlKit.SELECT:
                ComboBox cbo = new ComboBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, DropDownStyle = ComboBoxStyle.DropDownList, Tag = field,
                };
                IList lsi = db.GetComboboxItem(field);
                if (lsi != null && lsi.Count > 0)
                {
                    cbo.DisplayMember = field.JOIN_VIEW;
                    cbo.ValueMember   = field.JOIN_FIELD;
                    cbo.DataSource    = lsi;
                }
                this.Controls.Add(cbo);
                cbo.BringToFront();
                break;

            case ControlKit.TEXT_PASS:
                TextBox txt_Pass = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, PasswordChar = '*', BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                this.Controls.Add(txt_Pass);
                txt_Pass.BringToFront();
                break;

            case ControlKit.TEXT_DATE:
            case ControlKit.TEXT_DATETIME:
            case ControlKit.TEXT_TIME:
                DateTimePicker dt = new DateTimePicker()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, CustomFormat = "dd-MM-yyyy HH:mm:ss", Format = DateTimePickerFormat.Custom, Tag = field,
                };
                this.Controls.Add(dt);
                dt.BringToFront();
                break;

            case ControlKit.TEXT_EMAIL:
                TextBox txt_Email = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                this.Controls.Add(txt_Email);
                txt_Email.BringToFront();
                break;

            case ControlKit.TEXT_FILE:
                TextBox txt_File = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_ - 30, Height = _Height, ReadOnly = true, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                Button btn_Browser = new Button()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 28, Top = 0, Height = 18, Width = 30, Text = "...", FlatStyle = FlatStyle.Flat
                };
                this.Controls.AddRange(new Control[] { txt_File, btn_Browser });
                txt_File.BringToFront();
                btn_Browser.BringToFront();
                btn_Browser.Click += (se, ev) => select_File(txt_File);
                break;

            case ControlKit.TEXTAREA:
                _Height = Height_Max;
                _Width  = wi_Max + wi_Name + 8;
                TextBox text_area = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_Max, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Multiline = true, ScrollBars = ScrollBars.Vertical, WordWrap = true, Tag = field,
                };
                this.Controls.Add(text_area);
                text_area.BringToFront();
                break;

            case ControlKit.LOOKUP:
                TextBox txt_Lookup = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, ReadOnly = true, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                this.Controls.Add(txt_Lookup);
                txt_Lookup.BringToFront();
                break;

            case ControlKit.HTML:
                _Height = Height_Full;
                _Width  = wi_Max + wi_Name + 8;
                HtmlEditor html = new HtmlEditor(db, _fe)
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_Max, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Tag = field,
                };
                this.Controls.Add(html);
                html.BringToFront();
                break;

            default:     //case ControlKit.TEXT: break;
                TextBox txt = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                this.Controls.Add(txt);
                txt.BringToFront();
                break;
            }
            #endregion
        }
        public void Control_Type(enControl_InputType type = enControl_InputType.Edit, int rows = 1, bool actionButton = false)
        {
            #region Reset previous settings
            pAction_Button  = actionButton;
            lblName.Visible = true;
            if (actionButton)
            {
                Control_Columns(3);
            }
            else
            {
                Control_Columns();
            }

            if (type == enControl_InputType.Listbox)
            {
                if (rows < 3)
                {
                    rows = 3;                                                 // Listbox must be at least 3 rows
                }
            }
            Control_Rows(rows);           // Set the hight

            if (txtValue != null)
            {
                txtValue.Visible = false;
            }
            if (txtValueMasked != null)
            {
                txtValueMasked.Visible = false;
            }
            if (cboValue != null)
            {
                cboValue.Visible = false;
            }
            if (lstValue != null)
            {
                lstValue.Visible = false;
            }
            if (dtpValue != null)
            {
                dtpValue.Visible = false;
            }
            if (btnAction != null)
            {
                btnAction.Text = "..";
            }
            if (btnValue1 != null)
            {
                btnValue1.Visible = false;
            }
            if (btnValue2 != null)
            {
                btnValue2.Visible = false;
            }
            if (chkValue1 != null)
            {
                chkValue1.Visible = false;
            }
            if (chkValue2 != null)
            {
                chkValue2.Visible = false;
            }
            if (chkValue3 != null)
            {
                chkValue3.Visible = false;
            }
            if (rdoValue1 != null)
            {
                rdoValue1.Visible = false;
            }
            if (rdoValue2 != null)
            {
                rdoValue2.Visible = false;
            }
            if (rdoValue3 != null)
            {
                rdoValue3.Visible = false;
            }
            if (rdoValue4 != null)
            {
                rdoValue4.Visible = false;
            }
            lblName.Text = Control_Caption;
            #endregion

            // Edit
            if (type == enControl_InputType.Edit)
            {
                Input_Control_Tools.Create_TextBox(pnlText, ref txtValue, Handle_OnValueChange, Handle_KeyPress);
                txtValue.Visible = true;
                if (_ControlType == enControl_InputType.Edit_Masked)
                {
                    txtValue.Text = txtValueMasked.Text;
                }
            }

            // Edit_Masked
            if (type == enControl_InputType.Edit_Masked)
            {
                Input_Control_Tools.Create_TextboxMasked(pnlText, ref txtValueMasked, Handle_OnValueChange, Handle_KeyPress);
                txtValueMasked.Visible = true;
                if (_ControlType == enControl_InputType.Edit)
                {
                    txtValueMasked.Text = txtValue.Text;
                }
            }

            // Combobox
            if (type == enControl_InputType.Combobox)
            {
                Input_Control_Tools.Create_Combobox(pnlText, ref cboValue, Handle_OnValueChange);
                cboValue.Visible = true;
                if (_ControlType == enControl_InputType.Listbox)
                {
                    lstValue.Items.zTo_IList(cboValue.Items);                                              //cboValue.Items.zFrom_List(lstValue.Items, true);
                }
            }

            // Listbox
            if (type == enControl_InputType.Listbox)
            {
                Input_Control_Tools.Create_Listbox(pnlText, ref lstValue, Handle_OnValueChange);
                lstValue.Visible = true;
                if (_ControlType == enControl_InputType.Combobox)
                {
                    cboValue.Items.zTo_IList(lstValue.Items);                                               //lstValue.Items.zFrom_List(cboValue.Items, true);
                }
            }

            // DateTime
            if (type == enControl_InputType.DateTime)
            {
                Input_Control_Tools.Create_DateTimePicker(pnlText, ref dtpValue, Handle_OnValueChange);
                dtpValue.Visible = true;
            }

            #region Button
            if (type == enControl_InputType.Button1 || type == enControl_InputType.Button2 || type == enControl_InputType.Button3)
            {
                Input_Control_Tools.Create_Button1(pnlLabel, ref btnValue1, Handle_Button_Click);
                btnValue1.Text = _Control_Caption;
                Control_Columns(1);
                //pnlLabel.Visible =
                pnlLabel.Dock     = DockStyle.Fill;
                lblName.Visible   = false;
                btnValue1.Visible = true;
                // Button2
                if (type == enControl_InputType.Button2 || type == enControl_InputType.Button3)
                {
                    Input_Control_Tools.Create_Button2(pnlText, ref btnValue2, Handle_Button_Click);
                    btnValue2.Text = _Control_Caption2;
                    Control_Columns(2, enControl_InputWidth.Centre);
                    if (actionButton)
                    {
                        pnlButton.Visible = true;
                    }
                    lblName.Visible   = false;
                    btnValue2.Visible = true;
                }

                // Button3
                if (type == enControl_InputType.Button3)
                {
                    Control_Columns(3, enControl_InputWidth.Thirds);
                    btnAction.Text    = _Control_Caption3;
                    pnlButton.Visible = true;
                    lblName.Visible   = false;
                    btnAction.Visible = true;
                }
            }
            #endregion

            #region Checkbox
            if (type == enControl_InputType.Checkbox1 || type == enControl_InputType.Checkbox2 || type == enControl_InputType.Checkbox3)
            {
                Input_Control_Tools.Create_Checkbox(pnlLabel, ref chkValue1, _Control_Caption, Handle_OnValueChange);
                chkValue1.Text = _Control_Caption;
                chkValue1.Name = "chkValue1";
                Control_Columns(1);
                pnlLabel.Dock     = DockStyle.Fill;
                lblName.Visible   = false;
                chkValue1.Visible = true;
                if (type == enControl_InputType.Checkbox2 || type == enControl_InputType.Checkbox3)
                {
                    Input_Control_Tools.Create_Checkbox(pnlLabel, ref chkValue2, _Control_Caption2, Handle_OnValueChange);
                    chkValue2.Text    = _Control_Caption2;
                    chkValue2.Name    = "chkValue2";
                    chkValue2.Visible = true;
                }
                if (type == enControl_InputType.Checkbox3)
                {
                    Input_Control_Tools.Create_Checkbox(pnlLabel, ref chkValue3, _Control_Caption3, Handle_OnValueChange);
                    chkValue2.Text    = _Control_Caption2;
                    chkValue3.Text    = _Control_Caption3;
                    chkValue3.Name    = "chkValue3";
                    chkValue3.Visible = true;
                }
                chkValue1.SendToBack();
                if (chkValue3 != null)
                {
                    chkValue3.BringToFront();
                }
                if (actionButton)
                {
                    pnlButton.Visible = true;
                }
            }
            #endregion

            #region RadioButton
            if (type == enControl_InputType.RadioButton2 || type == enControl_InputType.RadioButton3 || type == enControl_InputType.RadioButton4)
            {
                Input_Control_Tools.Create_RadioButton(pnlLabel, ref rdoValue1, _Control_Caption, Handle_OnValueChange);
                Input_Control_Tools.Create_RadioButton(pnlLabel, ref rdoValue2, _Control_Caption2, Handle_OnValueChange);

                Control_Columns(1);
                pnlLabel.Dock     = DockStyle.Fill;
                lblName.Visible   = false;
                rdoValue1.Text    = _Control_Caption;
                rdoValue2.Text    = _Control_Caption2;
                rdoValue1.Visible = true;
                rdoValue2.Visible = true;
                rdoValue1.Name    = "rdoValue1";
                rdoValue2.Name    = "rdoValue2";

                rdoValue1.SendToBack();
                if (type == enControl_InputType.RadioButton3 || type == enControl_InputType.RadioButton4)
                {
                    Input_Control_Tools.Create_RadioButton(pnlLabel, ref rdoValue3, _Control_Caption3, Handle_OnValueChange);
                    rdoValue3.Text    = _Control_Caption3;
                    rdoValue3.Visible = true;
                    rdoValue3.Name    = "rdoValue3";
                    rdoValue3.BringToFront();
                }
                if (type == enControl_InputType.RadioButton4)
                {
                    Input_Control_Tools.Create_RadioButton(pnlLabel, ref rdoValue4, _Control_Caption4, Handle_OnValueChange);
                    rdoValue4.Text    = _Control_Caption4;
                    rdoValue4.Visible = true;
                    rdoValue4.Name    = "rdoValue4";
                    rdoValue4.BringToFront();
                }
                if (actionButton)
                {
                    pnlButton.Visible = true;
                }
            }
            #endregion

            pnlBorder.Invalidate();
            _ControlType = type;
        }
        public ucDataItemEdit(string dbName, int index, FieldInfo field, IDataFile db, IDataFieldEvent _fe)
        {
            int wi_Name = 110, wi_Max = 630, wi_ = 200;

            _Height = Height_Min;
            _Width  = wi_ + wi_Name + 8;
            string caption  = string.IsNullOrEmpty(field.CAPTION) ? field.NAME : field.CAPTION;
            Label  lbl_Name = new Label()
            {
                Dock = DockStyle.Left, Left = 4, Top = 0, Text = caption, AutoSize = false, Width = wi_Name, ForeColor = Color.Black, TextAlign = ContentAlignment.TopRight
            };

            this.Controls.Add(lbl_Name);

            if (field.TYPE_NAME == typeof(Byte).Name && field.KIT != ControlKit.CHECK)
            {
                ComboBox cbo = new ComboBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, DropDownStyle = ComboBoxStyle.DropDownList, Tag = field,
                };
                for (int k = 0; k < 256; k++)
                {
                    cbo.Items.Add(k.ToString());
                }
                cbo.SelectedIndex = 0;
                this.Controls.Add(cbo);
                cbo.BringToFront();
                return;
            }

            #region

            switch (field.KIT)
            {
            case ControlKit.LABEL:
                Label lbl = new Label()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, AutoSize = false, Width = wi_, Height = _Height - 5, BackColor = SystemColors.Control, Tag = field,
                };
                this.Controls.Add(lbl);
                if (field.Value != null)
                {
                    lbl.Text = field.Value.ToString();
                }
                lbl.BringToFront();
                break;

            case ControlKit.CHECK:
                CheckBox chk = new CheckBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Tag = field,
                };
                this.Controls.Add(chk);
                if (field.Value != null && field.Value.ToString() == "1")
                {
                    chk.Checked = true;
                }
                chk.BringToFront();
                break;

            case ControlKit.RADIO:
                RadioButton radio = new RadioButton()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Tag = field,
                };
                this.Controls.Add(radio);
                radio.BringToFront();
                break;

            case ControlKit.COLOR:
                Label lbl_Color = new Label()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, AutoSize = false, Width = 44, Height = _Height - 5, BackColor = Color.Gray, Tag = field,
                };
                this.Controls.Add(lbl_Color);
                if (field.Value != null)
                {
                    lbl_Color.Text = field.Value.ToString();
                }
                lbl_Color.BringToFront();
                break;

            case ControlKit.SELECT:
                #region

                ComboBox cbo = new ComboBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, DropDownStyle = ComboBoxStyle.DropDownList, Tag = field,
                };
                IList lsi = db.GetComboboxItem(field);
                if (lsi != null && lsi.Count > 0)
                {
                    List <string> lf = new List <string>();
                    foreach (object it in lsi)
                    {
                        object v = it.GetType().GetProperty(field.JOIN_FIELD).GetValue(it, null);
                        lf.Add(v == null ? "" : v.ToString());
                    }

                    List <string> lv = new List <string>();
                    foreach (object it in lsi)
                    {
                        object v = it.GetType().GetProperty(field.JOIN_VIEW).GetValue(it, null);
                        lv.Add(v == null ? "" : v.ToString());
                    }

                    for (int k = 0; k < lv.Count; k++)
                    {
                        cbo.Items.Add(new ComboboxItem()
                        {
                            Text = lv[k], Value = lf[k]
                        });
                    }
                }

                this.Controls.Add(cbo);

                if (field.Value != null)
                {
                    int kii = 0, _index = -1;
                    foreach (object myObj in lsi)
                    {
                        var lii = myObj.GetType().GetProperties().Select(pi => pi.GetValue(myObj, null)).Select(x => x == null ? "" : x.ToString()).ToList();
                        if (lii.IndexOf(field.Value.ToString()) != -1)
                        {
                            _index = kii;
                            break;
                        }
                        kii++;
                    }
                    if (_index != -1)
                    {
                        cbo.SelectedIndex = _index;
                    }
                }

                cbo.BringToFront();

                #endregion
                break;

            case ControlKit.TEXT_PASS:
                TextBox txt_Pass = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, PasswordChar = '*', BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                if (field.Value != null)
                {
                    txt_Pass.Text = field.Value.ToString();
                }
                this.Controls.Add(txt_Pass);
                txt_Pass.BringToFront();
                break;

            case ControlKit.TEXT_DATE:
            case ControlKit.TEXT_DATETIME:
            case ControlKit.TEXT_TIME:
                DateTimePicker dt = new DateTimePicker()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, CustomFormat = "dd-MM-yyyy HH:mm:ss", Format = DateTimePickerFormat.Custom, Tag = field,
                };
                this.Controls.Add(dt);
                dt.BringToFront();
                break;

            case ControlKit.TEXT_EMAIL:
                TextBox txt_Email = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                if (field.Value != null)
                {
                    txt_Email.Text = field.Value.ToString();
                }
                this.Controls.Add(txt_Email);
                txt_Email.BringToFront();
                break;

            case ControlKit.TEXT_FILE:
                TextBox txt_File = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_ - 30, Height = _Height, ReadOnly = true, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                Button btn_Browser = new Button()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 28, Top = 0, Height = 18, Width = 30, Text = "...", FlatStyle = FlatStyle.Flat
                };
                this.Controls.AddRange(new Control[] { txt_File, btn_Browser });
                if (field.Value != null)
                {
                    txt_File.Text = field.Value.ToString();
                }
                txt_File.BringToFront();
                btn_Browser.BringToFront();
                btn_Browser.Click += (se, ev) => select_File(txt_File);
                break;

            case ControlKit.TEXTAREA:
                _Height = Height_Max;
                _Width  = wi_Max + wi_Name + 8;
                TextBox text_area = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_Max, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Multiline = true, ScrollBars = ScrollBars.Vertical, WordWrap = true, Tag = field,
                };
                this.Controls.Add(text_area);
                if (field.Value != null)
                {
                    text_area.Text = field.Value.ToString();
                }
                text_area.BringToFront();
                break;

            case ControlKit.LOOKUP:
                TextBox txt_Lookup = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, ReadOnly = true, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                this.Controls.Add(txt_Lookup);
                if (field.Value != null)
                {
                    txt_Lookup.Text = field.Value.ToString();
                }
                txt_Lookup.BringToFront();
                break;

            case ControlKit.HTML:
                _Height = Height_Full;
                _Width  = wi_Max + wi_Name + 8;
                HtmlEditor html = new HtmlEditor(db, _fe)
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_Max, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Tag = field,
                };
                this.Controls.Add(html);
                if (field.Value != null)
                {
                    html.Html = field.Value.ToString();
                }
                html.BringToFront();
                break;

            default:     //case ControlKit.TEXT: break;
                TextBox txt = new TextBox()
                {
                    Dock = DockStyle.Left, Left = wi_Name + 8, Top = 0, Width = wi_, Height = _Height, BorderStyle = BorderStyle.FixedSingle, Multiline = false, ScrollBars = ScrollBars.None, WordWrap = false, Tag = field,
                };
                this.Controls.Add(txt);
                if (field.Value != null)
                {
                    txt.Text = field.Value.ToString();
                }
                txt.BringToFront();
                break;
            }
            #endregion
        }
示例#13
0
文件: Form1.cs 项目: Liverka/Enigma
        private void ОписаниеВсего()
        {
            СписокЯзыков.Items.Insert(0, "English");
            СписокЯзыков.Items.Insert(1, "Русский");
            СписокЯзыков.SelectedIndex = 0;
            СписокЯзыков.DropDownStyle = ComboBoxStyle.DropDownList;
            СписокЯзыков.Location      = new Point(20, 180);
            СписокЯзыков.Size          = new Size(200, 20);
            СписокЯзыков.Visible       = true;

            btnAdd3.Text     = "Обзор";
            btnAdd3.Location = new Point(360, 184);
            btnAdd3.Size     = new Size(80, 22);
            btnAdd3.Click   += new EventHandler(button3_Click);
            btnAdd3.Visible  = true;
            btnAdd3.BringToFront();

            btnAdd.Text     = "Отмена";
            btnAdd.Location = new Point(365, 315);
            btnAdd.Size     = new Size(70, 22);
            btnAdd.Click   += new EventHandler(button0_Click);
            btnAdd.BringToFront();

            btnAdd1.Text     = "Далее";
            btnAdd1.Location = new Point(280, 315);
            btnAdd1.Size     = new Size(70, 22);
            btnAdd1.Click   += new EventHandler(button1_Click);
            btnAdd1.BringToFront();

            btnAdd2.Text     = "Назад";
            btnAdd2.Location = new Point(209, 315);
            btnAdd2.Size     = new Size(70, 22);
            btnAdd2.Click   += new EventHandler(button2_Click);
            btnAdd2.BringToFront();
            btnAdd2.Enabled = false;

            panel.BackColor   = SystemColors.Control;
            panel.Location    = new Point(0, 300);
            panel.Size        = new Size(465, 85);
            panel.BorderStyle = BorderStyle.FixedSingle;

            picture.Location = new Point(12, 12);
            picture.Size     = new Size(161, 259);
            picture.Image    = Properties.Resources.Cezar;

            link.Text         = "О разработчике";
            link.AutoSize     = true;
            link.Location     = new Point(180, 250);
            link.Size         = new Size(80, 30);
            link.LinkClicked += new LinkLabelLinkClickedEventHandler(linkLabel1);

            Cezar.Name = "Cezar";
            Cezar.Text = "Добро пожаловать в Enigma! \n\nЭто приложение созданное для преобразования текста с секретом (ключом) для обеспечения секретности передаваемой информации при ведении тайной переписки . Программа для преобразования информации использует шифр Цезаря.\n\n" +
                         "Пожалуйста обратите внимание, что шифр Цезаря является самым простым и наиболее широко известным методом шифрования. И если предложить любому человеку придумать свой алгоритм шифровки, то он, наверняка, «придумает» именно такой способ, ввиду его простоты.";
            Cezar.Location = new Point(180, 25);
            Cezar.Size     = new Size(240, 210);
            Cezar.Links.Add(239, 6);
            Cezar.Font = new Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular);
            Cezar.BringToFront();
            Cezar.LinkClicked += new LinkLabelLinkClickedEventHandler(linkLabel2);

            RB1.Location  = new Point(20, 100);
            RB1.Size      = new Size(200, 20);
            RB1.BackColor = SystemColors.Control;
            RB1.Text      = "Кодирование текста";
            RB1.BringToFront();

            RB2.Location  = new Point(20, 160);
            RB2.Size      = new Size(200, 20);
            RB2.BackColor = SystemColors.Control;
            RB2.Text      = "Декодирование текста";
            RB2.BringToFront();

            label3.Font      = new Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Bold);
            label3.BackColor = SystemColors.ControlLightLight;
            label3.Location  = new Point(20, 10);
            label3.Size      = new Size(140, 15);

            label4.Text      = "Кодирование или декодирование текста";
            label4.BackColor = SystemColors.ControlLightLight;
            label4.Location  = new Point(40, 25);
            label4.Size      = new Size(350, 15);

            ОписаниеКодирования.Text      = "Шифрует входной текст на русском языке всеми возможными\nкомбинациями шифра Цезаря.";
            ОписаниеКодирования.Font      = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular);
            ОписаниеКодирования.BackColor = SystemColors.Control;
            ОписаниеКодирования.Location  = new Point(40, 122);
            ОписаниеКодирования.Size      = new Size(450, 30);

            ОписаниеДекодирования.Text      = "Выдает таблицу всех возможных в шифре Цезаря\nпреобразований введенного текста.";
            ОписаниеДекодирования.Font      = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular);
            ОписаниеДекодирования.BackColor = SystemColors.Control;
            ОписаниеДекодирования.Location  = new Point(40, 182);
            ОписаниеДекодирования.Size      = new Size(450, 30);

            picture1.Location = new Point(401, 5);
            picture1.Size     = new Size(35, 35);
            picture1.Image    = Properties.Resources._300px;

            panel1.BackColor   = SystemColors.Control;
            panel1.Location    = new Point(-1, 55);
            panel1.Size        = new Size(465, 335);
            panel1.BorderStyle = BorderStyle.FixedSingle;

            RB3.Location  = new Point(20, 100);
            RB3.Size      = new Size(100, 20);
            RB3.BackColor = SystemColors.Control;
            RB3.Text      = "Ввод текста";
            RB3.BringToFront();

            RB4.Location        = new Point(20, 125);
            RB4.BackColor       = SystemColors.Control;
            RB4.Size            = new Size(110, 20);
            RB4.Text            = "Текст из файла";
            RB4.CheckedChanged += new EventHandler(radioButton2_CheckedChanged);
            RB4.BringToFront();


            label3.Font      = new Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Bold);
            label3.BackColor = SystemColors.ControlLightLight;
            label3.Location  = new Point(20, 10);
            label3.Size      = new Size(250, 15);

            label4.BackColor = SystemColors.ControlLightLight;
            label4.Location  = new Point(40, 25);
            label4.Size      = new Size(300, 15);

            label2.Text      = "Файл для декодирования:";
            label2.BackColor = SystemColors.Control;
            label2.Location  = new Point(50, 165);
            label2.AutoSize  = true;

            text1.Location  = new Point(50, 185);
            text1.Multiline = true;
            text1.Size      = new Size(300, 20);

            panel1.BackColor   = SystemColors.Control;
            panel1.Location    = new Point(-1, 55);
            panel1.Size        = new Size(465, 335);
            panel1.BorderStyle = BorderStyle.FixedSingle;

            Язык.Text      = "Выберите язык:";
            Язык.Font      = new Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Bold);
            Язык.BackColor = SystemColors.ControlLightLight;
            Язык.Location  = new Point(20, 10);
            Язык.Size      = new Size(140, 15);

            Язык1.Text      = "Выберите язык изменяемого текста";
            Язык1.BackColor = SystemColors.ControlLightLight;
            Язык1.Location  = new Point(40, 25);
            Язык1.Size      = new Size(300, 15);

            ОписаниеЯзычков.Text      = "Энигма может работать только с 1 языком.\nПожалуйста убедитесь, что выбрали нужный язык и перейдите к следующему шагу нажав \"Далее\".";
            ОписаниеЯзычков.BackColor = SystemColors.Control;
            ОписаниеЯзычков.Location  = new Point(20, 85);
            ОписаниеЯзычков.Size      = new Size(380, 55);

            ОписаниеВыбора.Text      = "Язык для кодирования:";
            ОписаниеВыбора.Font      = new Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular);
            ОписаниеВыбора.BackColor = SystemColors.Control;
            ОписаниеВыбора.Location  = new Point(20, 150);
            ОписаниеВыбора.Size      = new Size(140, 15);
        }