Exemple #1
0
        public dp2QueryLine(dp2QueryControl control)
        {
            this.Container = control;

            label_state = new Label();
            label_state.Dock = DockStyle.Fill;
            label_state.AutoSize = true;
            label_state.Image = this.Container.imageList_states.Images[0];
            label_state.ImageAlign = ContentAlignment.MiddleCenter;

            comboBox_logicOperator = new ComboBox();
            comboBox_logicOperator.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox_logicOperator.FlatStyle = FlatStyle.Flat;
            comboBox_logicOperator.Dock = DockStyle.Fill;
            comboBox_logicOperator.MaximumSize = new Size(150, 28);
            comboBox_logicOperator.Size = new Size(80, 28);
            comboBox_logicOperator.MinimumSize = new Size(50, 28);
            comboBox_logicOperator.Items.AddRange(new object[] {
                "AND 与",
                "OR  或",
                "SUB 减",
            });
            comboBox_logicOperator.Text = "AND 与";

            // servers
            comboBox_server = new ComboBox();
            // comboBox_server.DropDownStyle = ComboBoxStyle.DropDownList;
            if ((this.Container.PanelMode & PanelMode.ServerName) == 0)
                comboBox_server.Visible = false;
            comboBox_server.FlatStyle = FlatStyle.Flat;
            comboBox_server.Dock = DockStyle.Fill;
            comboBox_server.MaximumSize = new Size(150, 28);
            comboBox_server.Size = new Size(120, 28);
            comboBox_server.MinimumSize = new Size(100, 28);
            comboBox_server.Text = "";
            comboBox_server.DropDownWidth = 150;

            // dbname
            comboBox_dbName = new ComboBox();
            // comboBox_dbName.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox_dbName.FlatStyle = FlatStyle.Flat;
            comboBox_dbName.Dock = DockStyle.Fill;
            comboBox_dbName.MaximumSize = new Size(150, 28);
            comboBox_dbName.Size = new Size(120, 28);
            comboBox_dbName.MinimumSize = new Size(100, 28);
            comboBox_dbName.Text = "";
            comboBox_dbName.DropDownWidth = 150;

            //
            textBox_word = new TextBox();
            textBox_word.BorderStyle = BorderStyle.None;
            textBox_word.Font = new Font(this.Container.Font, FontStyle.Bold);
            textBox_word.Dock = DockStyle.Fill;
            textBox_word.MaximumSize = new Size(200, 28);
            textBox_word.Size = new Size(150, 28);
            textBox_word.MinimumSize = new Size(100, 28);
            // textBox_word.Margin = new Padding(-1, -1, -1, -1);

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

            // matchstyle
            comboBox_matchStyle = new ComboBox();
            comboBox_matchStyle.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox_matchStyle.FlatStyle = FlatStyle.Flat;
            comboBox_matchStyle.Dock = DockStyle.Fill;
            comboBox_matchStyle.MaximumSize = new Size(150, 28);
            comboBox_matchStyle.Size = new Size(80, 28);
            comboBox_matchStyle.MinimumSize = new Size(50, 28);
            comboBox_matchStyle.Items.AddRange(new object[] {
                "前方一致",
                "中间一致",
                "后方一致",
                "精确一致",
                "空值",
            });
            comboBox_matchStyle.Text = "前方一致";

            AddEvents(true);
        }
Exemple #2
0
 void DisposeChildControls()
 {
     label_state.Dispose();
     comboBox_logicOperator.Dispose();
     comboBox_server.Dispose();
     comboBox_dbName.Dispose();
     textBox_word.Dispose();
     comboBox_from.Dispose();
     comboBox_matchStyle.Dispose();
     Container = null;
 }