Наследование: ATMLCommonLibrary.forms.ATMLForm
Пример #1
0
        private void lvSwitchRelays_OnAdd()
        {
            List <Port> ports = GetPortList();
            var         form  = new SwitchRelayForm(ports);

            if (DialogResult.OK == form.ShowDialog())
            {
                AddConnection(form.SwitchRelaySetting);
            }
        }
Пример #2
0
 private void lvSwitchRelays_OnEdit()
 {
     if (lvSwitchRelays.HasSelected)
     {
         var form = new SwitchRelayForm(GetPortList())
         {
             SwitchRelaySetting = lvSwitchRelays.SelectedItems[0].Tag as SwitchRelaySetting
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             lvSwitchRelays.SelectedItems[0].Tag = form.SwitchRelaySetting;
             lvSwitchRelays.SelectedItems[0].SubItems[0].Text = form.SwitchRelaySetting.name;
         }
     }
 }
Пример #3
0
 private void lvSwitchRelays_OnEdit()
 {
     if (lvSwitchRelays.HasSelected)
     {
         var form = new SwitchRelayForm(GetPortList())
         {
             SwitchRelaySetting = lvSwitchRelays.SelectedItems[0].Tag as SwitchRelaySetting
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             lvSwitchRelays.SelectedItems[0].Tag = form.SwitchRelaySetting;
             lvSwitchRelays.SelectedItems[0].SubItems[0].Text = form.SwitchRelaySetting.name;
         }
     }
 }
Пример #4
0
 private void lvSwitchRelays_OnAdd()
 {
     List<Port> ports = GetPortList();
     var form = new SwitchRelayForm(ports);
     if (DialogResult.OK == form.ShowDialog())
     {
         AddConnection(form.SwitchRelaySetting);
     }
 }