示例#1
0
文件: DcEditor.cs 项目: renyh1013/dp2
        public DcElement(DcEditor container)
        {
            this.Container = container;

            label_color = new Label();
            label_color.Dock = DockStyle.Fill;
            //label_color.MaximumSize = new Size(150, 28);
            label_color.Size = new Size(6, 28);
            //label_color.MinimumSize = new Size(50, 28);

            // element
            comboBox_element = new ComboBox();
            comboBox_element.DropDownStyle = ComboBoxStyle.DropDown;
            comboBox_element.FlatStyle = FlatStyle.Flat;
            comboBox_element.Dock = DockStyle.Fill;
            comboBox_element.MaximumSize = new Size(200, 28);
            comboBox_element.Size = new Size(150, 28);
            comboBox_element.MinimumSize = new Size(50, 28);
            comboBox_element.DropDownHeight = 300;
            comboBox_element.DropDownWidth = 300;

            comboBox_element.ForeColor = this.Container.tableLayoutPanel_main.ForeColor;

            /*
            comboBox_element.Items.AddRange(new object[] {
                "title",
                "author",
                "decription",
            });
             * */
            comboBox_element.Text = "";


            /*
            // refinement
            comboBox_refinement = new ComboBox();
            comboBox_refinement.DropDownStyle = ComboBoxStyle.DropDown;
            comboBox_refinement.FlatStyle = FlatStyle.Flat;
            comboBox_refinement.DropDownHeight = 300;
            comboBox_refinement.DropDownWidth = 300;
            comboBox_refinement.Dock = DockStyle.Fill;
            comboBox_refinement.MaximumSize = new Size(200, 28);
            comboBox_refinement.Size = new Size(150, 28);
            comboBox_refinement.MinimumSize = new Size(100, 28);
             * */

            // scheme
            comboBox_scheme = new ComboBox();
            comboBox_scheme.DropDownStyle = ComboBoxStyle.DropDown;
            comboBox_scheme.FlatStyle = FlatStyle.Flat;
            comboBox_scheme.DropDownHeight = 300;
            comboBox_scheme.DropDownWidth = 300;
            comboBox_scheme.Dock = DockStyle.Fill;
            comboBox_scheme.MaximumSize = new Size(200, 28);
            comboBox_scheme.Size = new Size(150, 28);
            comboBox_scheme.MinimumSize = new Size(50, 28);

            comboBox_scheme.ForeColor = this.Container.tableLayoutPanel_main.ForeColor;

            // language
            comboBox_language = new ComboBox();
            comboBox_language.DropDownStyle = ComboBoxStyle.DropDown;
            comboBox_language.FlatStyle = FlatStyle.Flat;
            comboBox_language.DropDownHeight = 300;
            comboBox_language.DropDownWidth = 250;
            comboBox_language.Dock = DockStyle.Fill;
            comboBox_language.MaximumSize = new Size(150, 28);
            comboBox_language.Size = new Size(100, 28);
            comboBox_language.MinimumSize = new Size(50, 28);

            comboBox_language.ForeColor = this.Container.tableLayoutPanel_main.ForeColor;

            // value
            textBox_value = new TextBox();
            textBox_value.BorderStyle = BorderStyle.None;
            textBox_value.Dock = DockStyle.Fill;
            textBox_value.MinimumSize = new Size(100, 28);
            textBox_value.MaxLength = 0;
            textBox_value.Multiline = true;
            textBox_value.Margin = new Padding(6, 3, 6, 0);

            textBox_value.ForeColor = this.Container.tableLayoutPanel_main.ForeColor;
        }
示例#2
0
文件: DcEditor.cs 项目: renyh1013/dp2
 void DisposeChildControls()
 {
     label_color.Dispose();
     comboBox_element.Dispose();
     comboBox_scheme.Dispose();
     comboBox_language.Dispose();
     textBox_value.Dispose();
     Container = null;
 }