/// <summary> /// 新建窗口 /// </summary> public TestResult() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.Text = "缺陷新建"; this.button5.Dispose(); this.button6.Dispose(); this.linkLabel1.Dispose(); this.comboBox1.DataSource = Source_Person; this.comboBox1.DisplayMember = "fullname"; this.comboBox1.ValueMember = "id"; this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.textBox1.Text = TestUnitDao.getNewUnitNO(); this.comboBox2.DataSource = Source_Module; this.comboBox2.DisplayMember = "fullname"; this.comboBox2.ValueMember = "id"; this.comboBox2.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox2.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.comboBox3.DataSource = Source_Project; this.comboBox3.DisplayMember = "projectname"; this.comboBox3.ValueMember = "id"; this.comboBox3.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox3.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.comboBox4.DataSource = Source_testor; this.comboBox4.DisplayMember = "fullname"; this.comboBox4.ValueMember = "id"; this.comboBox4.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox4.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.comboBox5.DataSource = CommonConst.BUGLEVEL; this.comboBox5.DropDownStyle = ComboBoxStyle.DropDownList; this.comboBox6.DataSource = CommonConst.BUGTYPE; this.comboBox6.DropDownStyle = ComboBoxStyle.DropDownList; this.multiColumnFilterComboBox1.DataSource = PackageDao.getAllUnTestPack(); this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("packagename", 200, true)); this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("packtime", 60, true)); this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("code", 60, true)); this.multiColumnFilterComboBox1.DisplayMember = "packagename"; this.multiColumnFilterComboBox1.ValueMember = "id"; this.multiColumnFilterComboBox1.Validated += new EventHandler(Package_SelectedValueChanged); this.CenterToParent(); //InsertImage(); //read(); // // TODO: Add constructor code after the InitializeComponent() call. // }
//新建 public UICheck() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.KeyPreview = true; //先响应控件的ctrl+V的keydown事件。 this.comboBox1.DataSource = Source_Person; this.comboBox1.DisplayMember = "fullname"; this.comboBox1.ValueMember = "id"; this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.textBox2.Text = UICheckDao.getNewCheckNO(); this.comboBox2.DataSource = Source_Module; this.comboBox2.DisplayMember = "fullname"; this.comboBox2.ValueMember = "id"; this.comboBox2.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox2.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.comboBox3.DataSource = Source_Project; this.comboBox3.DisplayMember = "projectname"; this.comboBox3.ValueMember = "id"; this.comboBox3.AutoCompleteSource = AutoCompleteSource.ListItems; this.comboBox3.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.multiColumnFilterComboBox1.DataSource = PackageDao.getAllUnTestPack(); this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("packagename", 200, true)); this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("packtime", 60, true)); this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("code", 60, true)); this.multiColumnFilterComboBox1.DisplayMember = "packagename"; this.multiColumnFilterComboBox1.ValueMember = "id"; this.multiColumnFilterComboBox1.Validated += new EventHandler(Package_SelectedValueChanged); this.textBox1.Enabled = false; //新建时禁止评论图片 this.KeyDown += new KeyEventHandler(pictureBox1_KeyDown); this.pictureBox1.Click += new EventHandler(pictureBox1_Click); this.drawToolsControl.Visible = false; this.colorSelector.Visible = false; this.textBox.Visible = false; this.CenterToParent(); uiinfo = new UIcheckinfo(); this.button3.Visible = false; this.button6.Visible = false; ValidateUPDOWN(); // // TODO: Add constructor code after the InitializeComponent() call. // }