private void configButton_Click(object sender, EventArgs e) { this.iEditIndex = -1; if (this.oRuleEditorForm == null || this.oRuleEditorForm.IsDisposed) { this.oRuleEditorForm = new RuleEditorForm(this); } this.oRuleEditorForm.setType("Host"); this.oRuleEditorForm.Show(); }
/** * 单元格右键修改Rule */ private void editRuleToolStripMenuItem_Click(object sender, EventArgs e) { int iCurrentIndex = this.dataGridView.CurrentCell.RowIndex; String sType = this.dataGridView.Rows[this.dataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString(); String sVal = this.dataGridView.Rows[this.dataGridView.CurrentCell.RowIndex].Cells[2].Value.ToString(); this.iEditIndex = iCurrentIndex; if (null == this.oRuleEditorForm || this.oRuleEditorForm.IsDisposed) { this.oRuleEditorForm = new RuleEditorForm(this); } this.oRuleEditorForm.setType(sType); this.oRuleEditorForm.setRuleText(sVal); oRuleEditorForm.Show(); }
/** * 双击单元格弹出编辑窗口 */ private void dataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { int currentIndex = e.RowIndex; if (currentIndex < 0) { return; } string sType = this.dataGridView.Rows[currentIndex].Cells[1].Value.ToString(); string sVal = this.dataGridView.Rows[currentIndex].Cells[2].Value.ToString(); this.iEditIndex = currentIndex; if (null == this.oRuleEditorForm || this.oRuleEditorForm.IsDisposed) { this.oRuleEditorForm = new RuleEditorForm(this); } this.oRuleEditorForm.setType(sType); this.oRuleEditorForm.setRuleText(sVal); oRuleEditorForm.Show(); }
/** * 双击单元格弹出编辑窗口 */ private void dataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { int currentIndex = e.RowIndex; if(currentIndex < 0) { return; } string sType = this.dataGridView.Rows[currentIndex].Cells[1].Value.ToString(); string sVal = this.dataGridView.Rows[currentIndex].Cells[2].Value.ToString(); this.iEditIndex = currentIndex; if (null == this.oRuleEditorForm || this.oRuleEditorForm.IsDisposed) { this.oRuleEditorForm = new RuleEditorForm(this); } this.oRuleEditorForm.setType(sType); this.oRuleEditorForm.setRuleText(sVal); oRuleEditorForm.Show(); }
private void configButton_Click(object sender, EventArgs e) { this.iEditIndex = -1; if(this.oRuleEditorForm == null || this.oRuleEditorForm.IsDisposed) { this.oRuleEditorForm = new RuleEditorForm(this); } this.oRuleEditorForm.setType("Host"); this.oRuleEditorForm.Show(); }