2 using System.Collections.Generic;
3 using System.ComponentModel;
7 using System.Windows.Forms;
9 namespace Sample_Environment_Control_Interface.Dialogs.VI
18 InitializeComponent();
24 for (
int i = 0; i < Seci.SeciInterface.LVPanelProperties.Count; ++i)
26 lstVIs.Items.Add(Seci.SeciInterface.LVPanelProperties[i].PanelName);
33 if (lstVIs.SelectedIndex != -1)
35 lstToRemove.Items.Add(lstVIs.SelectedItem);
36 lstVIs.Items.RemoveAt(lstVIs.SelectedIndex);
42 if (lstToRemove.SelectedIndex != -1)
44 lstVIs.Items.Add(lstToRemove.SelectedItem);
45 lstToRemove.Items.RemoveAt(lstToRemove.SelectedIndex);
51 if (lstToRemove.Items.Count > 0)
54 toRemove =
new String[lstToRemove.Items.Count];
56 for (
int i = 0; i < lstToRemove.Items.Count; ++i)
58 toRemove[i] = lstToRemove.Items[i].ToString();
65 for (
int i = 0; i < toRemove.GetLength(0); ++i)
68 for (
int j = 0; j < Seci.SeciInterface.LVPanelProperties.Count; ++j)
70 if (Seci.SeciInterface.LVPanelProperties[j].PanelName == toRemove[i])
73 Seci.SeciInterface.Blocks.RemoveByVI(toRemove[i]);
76 Seci.SeciInterface.LVPanelProperties.Remove(Seci.SeciInterface.LVPanelProperties[j]);
77 Seci.SeciInterface.LV_RemoveVI(toRemove[i]);
79 SECI_GUI.CurrentLayout.RemoveVIFromAllGroups(toRemove[i]);
87 DialogResult = DialogResult.OK;
void btnOK_Click(object sender, EventArgs e)
void btnRemove_Click(object sender, EventArgs e)
void RemoveVI_Load(object sender, EventArgs e)
void btnUndo_Click(object sender, EventArgs e)