Пример #1
0
 private void 添加设备ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.mediator.IOTreeForm.SelectedNode is IOCommunicationNode)
     {
         FormManager.CreateIODeviceNode();
     }
 }
Пример #2
0
        private void IOCommunicationNode_Click(object sender, EventArgs e)
        {
            MenuItem item = sender as MenuItem;

            switch (item.Tag.ToString())
            {
            case "1":
                if (MessageBox.Show(this.TreeView.FindForm(), "是否要删除" + this.Communication.IO_COMM_LABEL + "通讯通道?", "删除提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    this.Remove();
                }
                break;

            case "2":
                FormManager.EditIOCommunicationNode(this);
                break;

            case "3":
                FormManager.CreateIODeviceNode();
                break;
            }
        }