public void 添加参数ToolStripMenuItem1_Click(object sender, EventArgs e) { if (Device != null) { FormManager.EditDevicePara(this.Server, this.Communication, this.Device, null); } }
public void 编辑参数ToolStripMenuItem_Click(object sender, EventArgs e) { if (Device != null && this.listView.SelectedItems.Count > 0) { IOListViewItem lvi = this.listView.SelectedItems[0] as IOListViewItem; FormManager.EditDevicePara(this.Server, this.Communication, this.Device, lvi.Para); } else { MessageBox.Show("请选择要编辑的IO测点"); } }
private void ListView_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { if (Device != null && this.listView.SelectedItems.Count > 0) { IOListViewItem lvi = this.listView.SelectedItems[0] as IOListViewItem; FormManager.EditDevicePara(this.Server, this.Communication, this.Device, lvi.Para); } else { MessageBox.Show("请选择要编辑的IO测点"); } } }