2 using System.Collections.Generic;
6 using System.Windows.Controls;
7 using System.Windows.Data;
8 using System.Windows.Documents;
9 using System.Windows.Input;
10 using System.Windows.Media;
11 using System.Windows.Media.Imaging;
12 using System.Windows.Shapes;
14 namespace SeciUserInterface.Dialogs.SubConfigs
22 public String ComponentName {
get {
return _tempComponent.ConfigName; } }
26 InitializeComponent();
31 List<String> comps = Seci.Managers.ComponentMgr.GetNames();
33 foreach(String comp
in comps)
35 comSubConfigs.Items.Add(comp);
41 if (comSubConfigs.SelectedIndex != -1)
43 _tempComponent = Seci.Managers.ComponentMgr.Components[comSubConfigs.SelectedIndex];
45 stkEditOptions.Visibility = System.Windows.Visibility.Visible;
46 stkSave.Visibility = System.Windows.Visibility.Visible;
47 btnSelect.IsEnabled =
false;
48 btnSelect.IsDefault =
false;
49 btnSave.IsDefault =
true;
50 comSubConfigs.IsEnabled =
false;
51 btnCancel1.Visibility = System.Windows.Visibility.Collapsed;
63 Seci.Managers.ComponentMgr.SaveComponent(_tempComponent.ConfigName);
70 if (_tempComponent != null)
73 conf.CanEditSubBlocks =
true;
75 if (_tempComponent.Blocks != null)
80 if (conf.ShowDialog() == System.Windows.Forms.DialogResult.OK)
82 _tempComponent.Blocks = conf.BlocksCopy;
89 if (_tempComponent != null)
92 if (add.ShowDialog() == System.Windows.Forms.DialogResult.OK)
97 for (
int i = 0; i < add.VIsToAdd.Count; ++i)
99 Boolean okayToAdd =
true;
101 for (
int j = 0; j < vis.Count; ++j)
103 if (vis[j].FilePath.ToLower() == add.VIsToAdd[i].ToLower())
113 _tempComponent.LVPanels.Add(pnl);
122 if (_tempComponent != null)
125 if (
remove.ShowDialog() == System.Windows.Forms.DialogResult.OK)
127 if (
remove.ToRemove != null)
130 for (
int i = 0; i < remove.ToRemove.Count; ++i)
133 _tempComponent.Blocks.RemoveByVI(remove.ToRemove[i]);
139 for (
int j = 0; j < panels.Count; ++j)
141 if (panels[j].FilePath ==
remove.ToRemove[i])
156 if (_tempComponent != null)
159 if (props.ShowDialog() == System.Windows.Forms.DialogResult.OK)
162 _tempComponent.LVPanels = props.Panels;
Interaction logic for EditTabs.xaml
void btnSave_Click(object sender, RoutedEventArgs e)
void btnAddVIs_Click(object sender, RoutedEventArgs e)
This class contains all the information that defines the configuration at the SECI level and contains...
void btnEditTabs_Click(object sender, RoutedEventArgs e)
void Window_Loaded(object sender, RoutedEventArgs e)
void btnRemoveVIs_Click(object sender, RoutedEventArgs e)
Specialised version of the Dictionary class which can be converted to XML. Also has some additional s...
This class contains all the information about a LabVIEW VI that needs to be saved in the configuratio...
void btnEditBlocks_Click(object sender, RoutedEventArgs e)
void btnCancel2_Click(object sender, RoutedEventArgs e)
void btnSelect_Click(object sender, RoutedEventArgs e)
Interaction logic for SelectSubConfig.xaml
void btnConfigureVIs_Click(object sender, RoutedEventArgs e)