コード例 #1
0
 void AddFunctionCodeToolStripMenuItemClick(object sender, EventArgs e)
 {
     if (treeView1.SelectedNode != null)
     {
         AddFunctionCodeForm addFunctionCodeForm = new AddFunctionCodeForm(easyModbusManager, treeView1.SelectedNode.Index);
         addFunctionCodeForm.Show();
     }
 }
コード例 #2
0
        void EditFunctionCodeToolStripMenuItemClick(object sender, EventArgs e)
        {
            if (treeView1.SelectedNode == null)
            {
                return;
            }
            int indexFunction   = treeView1.SelectedNode.Index;
            int indexConnection = treeView1.SelectedNode.Parent.Index;

            if (treeView1.SelectedNode.Level == 2)
            {
                AddFunctionCodeForm addFunctionCodeForm = new AddFunctionCodeForm(easyModbusManager, indexConnection, indexFunction);
                addFunctionCodeForm.ShowDialog();
            }
        }