예제 #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();
            }
        }