2 using System.Collections.Generic;
3 using System.ComponentModel;
7 using System.Windows.Forms;
9 namespace Sample_Environment_Control_Interface.Dialogs.Layout
13 public Seci.SerialisableList<SECI_Controls.Run_Information.Scaling_RunInfo> current =
new Seci.SerialisableList<SECI_Controls.Run_Information.Scaling_RunInfo>();
15 public Configure_RunInfo(Seci.SerialisableList<SECI_Controls.Run_Information.Scaling_RunInfo> list)
17 InitializeComponent();
19 for (
int i = 0; i < list.Count; ++i)
21 SECI_Controls.Run_Information.Scaling_RunInfo temp =
new SECI_Controls.Run_Information.Scaling_RunInfo();
22 temp.Location = list[i].Location;
23 temp.ItemsToShow = list[i].ItemsToShow;
24 temp.TitleName = list[i].TitleName;
25 temp.ShowTitle = list[i].ShowTitle;
39 lstControls.Items.Clear();
40 lstItems.Items.Clear();
42 for (
int i = 0; i < current.Count; ++i)
44 lstControls.Items.Add(current[i].TitleName);
50 lstItems.Items.Clear();
52 if (lstControls.SelectedIndex != -1)
54 lstItems.Items.AddRange((String[])current[lstControls.SelectedIndex].ItemsToShow.ToArray(typeof(String)));
60 SECI_Controls.Run_Information.Edit_RunInfo add =
new SECI_Controls.Run_Information.Edit_RunInfo();
62 if (add.ShowDialog() == DialogResult.OK)
64 SECI_Controls.Run_Information.Scaling_RunInfo temp =
new SECI_Controls.Run_Information.Scaling_RunInfo();
65 temp.ChangeItemsToShow(add.varsToShow, add.showTitle, add.name);
76 if (lstControls.SelectedIndex != -1)
78 SECI_Controls.Run_Information.Edit_RunInfo edit =
new SECI_Controls.Run_Information.Edit_RunInfo();
79 edit.varsToShow = (String[])current[lstControls.SelectedIndex].ItemsToShow.ToArray(typeof(String));
80 edit.name = current[lstControls.SelectedIndex].TitleName;
81 edit.showTitle = current[lstControls.SelectedIndex].ShowTitle;
83 if (edit.ShowDialog() == DialogResult.OK)
85 current[lstControls.SelectedIndex].ChangeItemsToShow(edit.varsToShow,edit.showTitle, edit.name);
94 if (lstControls.SelectedIndex != -1)
96 current.RemoveAt(lstControls.SelectedIndex);
103 DialogResult = DialogResult.OK;