SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
ConfigurationMgr.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.IO;
5 using Seci.Definitions;
6 
7 namespace Seci.Managers
8 {
14  public delegate void RemotingEventHandler(String[] vars);
15 
19  public static class ConfigurationMgr
20  {
21  internal static Configuration _currentConfig = new Configuration();
22  public static String ConfigName { get { return _currentConfig.ConfigName; } set { _currentConfig.ConfigName = value; } }
23 
24  //private static ComponentList _components = new ComponentList();
25  public static ComponentList Components { get { return ComponentMgr.Components; } set { ComponentMgr.Components = value; } }
26 
31 
35  public static void CreateNewConfiguration()
36  {
37  _currentConfig = new Configuration();
38 
39  }
40 
41  #region Save Config
42 
49  public static Boolean SaveConfiguration(Boolean manager, Boolean autoSave)
50  {
51  Managers.ConfigurationMgr.saveConfig(manager, autoSave);
52 
53  Seci.Helpers.MessageLogger.WriteMessage("SeciInterface", "Configuration saved: " + _currentConfig.ConfigName);
54 
55  return true;
56  }
57 
63  private static void saveConfig(Boolean manager, Boolean isAutosave)
64  {
65  //Sort out filename
66  String fileName;
67 
68  if (isAutosave)
69  {
70  //use different name for autosave
71  fileName = Status.ConfigDir + "autosave";
72  }
73  else
74  {
75  fileName = Status.ConfigDir + _currentConfig.ConfigName;
76  }
77 
78  //Get the latest panel information for saving.
79  _currentConfig.LVPanels = (SerialisableList<LabView.LabViewPanelInfo>)LabView.LabViewApp.GetAllPanelsInfo().Clone();
80  //Remove any panels which are part of a component
81  for (int i = _currentConfig.LVPanels.Count - 1; i >= 0; --i)
82  {
83  if (!String.IsNullOrEmpty(_currentConfig.LVPanels[i].OwningComponent))
84  {
85  _currentConfig.LVPanels.RemoveAt(i);
86  continue;
87  }
88  }
89 
90  //Take a copy of the graph definitions so they can be restored after saving
91  SerialisableList<GraphDefinition> tempGraphs = (SerialisableList<GraphDefinition>)_currentConfig.GraphDefinitions.Clone();
92  //Remove any graphs that belong to components
93  for (int i = _currentConfig.GraphDefinitions.Count - 1; i >= 0; --i)
94  {
95  if (!String.IsNullOrEmpty(_currentConfig.GraphDefinitions[i].OwningComponent))
96  {
97  _currentConfig.GraphDefinitions.RemoveAt(i);
98  }
99  }
100 
101  //get assoc files info for saving
102  _currentConfig.AssociatedFiles = (SerialisableList<Seci.Definitions.AssociatedFile>)AssocFileMgr.AssociatedFiles.Clone();
103  //Remove any assocfiles that belong to components
104  for (int i = _currentConfig.AssociatedFiles.Count - 1; i >= 0; --i)
105  {
106  if (!String.IsNullOrEmpty(_currentConfig.AssociatedFiles[i].OwningComponent))
107  {
108  _currentConfig.AssociatedFiles.RemoveAt(i);
109  }
110  }
111 
112  //Get the associated files bytes
113  for (int i = 0; i < _currentConfig.AssociatedFiles.Count; ++i)
114  {
115  _currentConfig.AssociatedFiles[i].ConvertFileToByteArray();
116  }
117 
118  //get exe info for saving
119  _currentConfig.Executables = (SerialisableList<Seci.Definitions.Executable>)ExecutableMgr.Executables.Clone();
120  //Remove any exes that belong to components
121  for (int i = _currentConfig.Executables.Count - 1; i >= 0; --i)
122  {
123  if (!String.IsNullOrEmpty(_currentConfig.Executables[i].OwningComponent))
124  {
125  _currentConfig.Executables.RemoveAt(i);
126  }
127  }
128 
129  //get the latest block info for saving.
130  //Any blocks from a component are automatically ignored when saved
131  //see IXmlSerializable Members on BlockDictionary for details
132  _currentConfig.Blocks = Managers.BlockMgr.Blocks;
133  _currentConfig.Groups = Managers.BlockMgr.Groups;
134 
135  //get components info for saving
136  _currentConfig.Components = Managers.ComponentMgr.Components;
137 
138  //get alerts for saving
139  _currentConfig.Alerts = Managers.AlertsMgr.GetAlertsCopyForSaving();
140 
141  //Set manager status
142  _currentConfig.SavedAsManager = manager;
143 
144  //Indicate that it has been saved by new Seci
145  _currentConfig.OldSeciFirstTime = false;
146 
147  //Saves the current config as xml
148  Helpers.ConfigurationIO.SaveConfig(_currentConfig, isAutosave, fileName);
149 
150  //Put the graphs back the way they were
151  _currentConfig.GraphDefinitions = tempGraphs;
152  }
153 
160  public static Boolean OkayToSave(Boolean manager)
161  {
162  return Helpers.ConfigurationIO.OkayToSave(ConfigName, manager);
163  }
164 
165  #endregion
166 
167  #region Open Config
168 
174  public static Boolean OpenConfiguration(String fileName)
175  {
176  Managers.ConfigurationMgr.openConfig(fileName);
177 
179  {
180  Standard.DaeMonitor.Initialise();
181  }
182 
183  Seci.Helpers.MessageLogger.WriteMessage("SeciInterface", "Configuration opened: " + fileName);
184 
185  if (Seci.Definitions.Status.LogToDatabase)
186  {
187  Seci.Helpers.DatabaseLogger.LogConfigName(fileName.Substring(fileName.LastIndexOf('\\') + 1));
188 
189  Seci.Helpers.DatabaseLogger.WriteBlockDetails();
190  }
191 
192  return true;
193  }
194 
195  public static void StartVIs()
196  {
197  for (int i = 0; i < _currentConfig.LVPanels.Count; ++i)
198  {
199  if (_currentConfig.LVPanels[i].StartRunning)
200  {
201  startVI(_currentConfig.LVPanels[i]);
202  }
203  }
204  }
205 
214  private static void openConfig(String fileName)
215  {
216  try
217  {
218  //Read config file and create new configuration object
219  Configuration temp = Helpers.ConfigurationIO.LoadConfig(fileName);
220 
221  //copy some stuff from the new config on to current config the rest will be sent to the associated manager
222  _currentConfig.ConfigName = temp.ConfigName;
223  _currentConfig.GraphDefinitions = temp.GraphDefinitions;
224 
225  //Sort out the tabs
226  _currentConfig.Tabs = temp.Tabs;
227  if (temp.TabOrder != null && temp.TabOrder.Count > 0 && _currentConfig.Tabs.Count == 0)
228  {
229  foreach (String tab in temp.TabOrder)
230  {
231  _currentConfig.Tabs.Add(new Tab(tab, true));
232  }
233  }
234 
235  //Give the alerts to the alerts manager
236  AlertsMgr.SetAlerts(temp.Alerts);
237 
238  //Set the components
239  ConfigurationMgr.Components = temp.Components;
240 
241  //Add any component tabs
242  AddComponentTabs();
243 
244  //Set the blocks
245  BlockMgr.SetBlocks(temp.Blocks);
246 
247  //Load Executables
248  for (int i = 0; i < temp.Executables.Count; ++i)
249  {
250  ExecutableMgr.AddExecutable(temp.Executables[i]);
251  }
252 
253  //Set the assoc files
254  for (int i = 0; i < temp.AssociatedFiles.Count; ++i)
255  {
256  AssocFileMgr.AddFile(temp.AssociatedFiles[i]);
257  AssocFileMgr.RecreateFile(temp.AssociatedFiles[i]);
258  }
259 
260  //Load VIs
261  loadVIsAndInitialise(temp.LVPanels);
262  ConfigurationMgr.LoadComponentsVisExes();
263 
264  //Set read types
265  for (int i = 0; i < temp.Blocks.Count; ++i)
266  {
267  try
268  {
269  temp.Blocks[i].ReadType = LabViewMgr.GetControlType(temp.Blocks[i].ParentVI, temp.Blocks[i].ReadControl);
270  }
271  catch (KeyNotFoundException err)
272  {
273  Helpers.ErrorLogger.SeciError("openConfig", new Exception(temp.Blocks[i].BlockName + "'s read control is invalid"));
274  }
275  }
276 
277  //Remove blocks associated with VIs that where not loaded
278  if (LabView.LabViewApp.VIsNotLoaded != null)
279  {
280  foreach (String name in LabView.LabViewApp.VIsNotLoaded)
281  {
282  BlockMgr.Blocks.RemoveByVI(name);
283  }
284  }
285 
286  //Sort out the block groups
287  SerialisableList<BlockGroup> used = new SerialisableList<BlockGroup>();
288 
289  if (temp.Blocks != null)
290  {
291  for (int i = 0; i < temp.Blocks.Count; ++i)
292  {
293  if (!groupExists(used, temp.Blocks[i].Group))
294  {
295  used.Add(new BlockGroup(temp.Blocks[i].Group));
296  }
297  }
298  }
299 
300  //If there are no block groups ordering in the configuration then this is the first time this configuration
301  //has been loaded since group ordering was added.
302  //So get the groups from the blocks and just use the order they come in.
303  if (temp.Groups == null || temp.Groups.Count == 0)
304  {
305  temp.Groups = used;
306  }
307  else
308  {
309  //Remove any groups that are not being used
310  for (int i = temp.Groups.Count - 1; i >= 0; --i)
311  {
312  bool found = false;
313  for (int j = 0; j < used.Count; ++j)
314  {
315  if (used[j].Name == temp.Groups[i].Name)
316  {
317  found = true;
318  break;
319  }
320  }
321 
322  if (!found)
323  {
324  temp.Groups.RemoveAt(i);
325  }
326  }
327  }
328 
329  BlockMgr.Groups = temp.Groups;
330 
331  if (temp.OldSeciFirstTime)
332  {
333  BlockMgr.SetBlocks(correctOldSeciBlocks(BlockMgr.Blocks));
334  }
335  else
336  {
337  BlockMgr.SetBlocks(BlockMgr.Blocks);
338  }
339 
340  Seci.Standard.DaeMonitor.WriteBlockList();
341  }
342  catch (Exception e)
343  {
344  Helpers.ErrorLogger.SeciError("openConfig", e);
345  //throw error up to next level
346  throw new ArgumentException(e.Message);
347  }
348  }
349 
350  private static bool groupExists(SerialisableList<BlockGroup> groups, string name)
351  {
352  for (int i = 0; i < groups.Count; ++i)
353  {
354  if (groups[i].Name == name)
355  {
356  return true;
357  }
358  }
359  return false;
360  }
361 
362  public static void AddComponentTabs()
363  {
364  for (int i = 0; i < ComponentMgr.Components.Count; ++i)
365  {
366  if (ComponentMgr.Components[i].Tabs != null)
367  {
368  for (int j = 0; j < ComponentMgr.Components[i].Tabs.Count; ++j)
369  {
370  Boolean tabexists = false;
371 
372  foreach (Tab t in _currentConfig.Tabs)
373  {
374  if (t.Name == ComponentMgr.Components[i].Tabs[j].Name)
375  {
376  tabexists = true;
377  break;
378  }
379  }
380 
381  if (!tabexists)
382  {
383  _currentConfig.Tabs.Add(ComponentMgr.Components[i].Tabs[j]);
384  }
385  }
386  }
387  }
388  }
389 
395  private static void loadVIsAndInitialise(SerialisableList<LabView.LabViewPanelInfo> panels)
396  {
397  FileInfo fi;
398 
399  try
400  {
401  //load VIs in main config
402  for (int i = 0; i < panels.Count; ++i)
403  {
404  //Create a reference to the panel to load (just to make the code clearer)
405  Seci.LabView.LabViewPanelInfo Panel = panels[i];
406 
407  //Might be a .llb, check for that
408  if (Panel.FilePath.Substring(0, Panel.FilePath.LastIndexOf('\\')).ToLower().EndsWith(".llb"))
409  {
410  //It is a .llb, so have to remove the .vi bit when checking the file exists
411  fi = new FileInfo(Panel.FilePath.Substring(0, Panel.FilePath.LastIndexOf('\\')));
412  }
413  else
414  {
415  //It is a .vi
416  fi = new FileInfo(Panel.FilePath);
417  }
418 
419  if (fi.Exists)
420  {
421  LabView.LabViewApp.LoadVI(Panel, true);
422 
423  if (Panel.ShowPanel)
424  {
425  LabView.LabViewApp.ShowVI(Panel.FilePath);
426  }
427 
428  if (Panel.StartRunning)
429  {
430  startVI(Panel);
431  }
432  }
433  else
434  {
435  //Add it to the list of VI's not loaded
436  LabView.LabViewApp.VIsNotLoaded.Add(fi.FullName);
437  }
438  }
439  }
440  catch (Exception e)
441  {
442  //throw error up to next level
443  throw new ArgumentException(e.Message);
444  }
445  }
446 
451  private static void startVI(Seci.LabView.LabViewPanelInfo Panel)
452  {
453  LabView.LabViewApp.StartVI(Panel.FilePath);
454 
455  //Halt if there is a delay requested
456  System.Threading.Thread.Sleep(Panel.DelayAfter * 1000);
457  }
458 
459  #endregion
460 
461  #region Close Config
462 
467  public static void CloseConfiguration(Boolean killIcp)
468  {
469  if (!LabView.LabViewApp.IsNull)
470  {
471  Seci.Helpers.MessageLogger.WriteMessage("SeciInterface", "Configuration closed");
472 
473  //Clear messageQ
474  Standard.MessageQueue.Messages.Clear();
475 
476  //Kill LabVIEW completely
477  LabView.LabViewApp.StopLabView();
478 
479  if (killIcp)
480  {
481  //Kill the Dae
482  Standard.Dae.KillIcp();
483  }
484 
485  ExecutableMgr.CloseAll();
486 
487  BlockMgr.Blocks.Clear();
488 
489  BlockMgr.Groups.Clear();
490 
491  AssocFileMgr.AssociatedFiles.Clear();
492 
493  AlertsMgr.ClearAlerts();
494 
495  _currentConfig.TabOrder = new SerialisableList<string>();
496  _currentConfig.GraphDefinitions = new SerialisableList<GraphDefinition>();
497  _currentConfig.ConfigName = "";
498 
499  ComponentMgr.Components.Clear();
500  }
501  }
502 
503  #endregion
504 
505  #region Tabs 'n' Graphs
506 
511  public static void SetTabOrder(List<String> tabs)
512  {
513  if (tabs != null)
514  {
515  _currentConfig.TabOrder = new SerialisableList<string>();
516  _currentConfig.TabOrder.AddRange(tabs);
517  }
518  else
519  {
520  _currentConfig.TabOrder = null;
521  }
522  }
523 
528  public static List<String> GetTabOrder()
529  {
530  List<String> temp = new List<string>(_currentConfig.TabOrder.ToArray());
531  return temp;
532  }
533 
534  public static void SetTabs(SerialisableList<Tab> tabs)
535  {
536  _currentConfig.Tabs = tabs;
537  }
538 
539  public static SerialisableList<Tab> GetTabs()
540  {
541  return _currentConfig.Tabs;
542  }
543 
544  public static void SetTabVisibility(String tabname, Boolean visible)
545  {
546  foreach (Tab t in _currentConfig.Tabs)
547  {
548  if (tabname == t.Name)
549  {
550  t.VisibleForUser = visible;
551  return;
552  }
553  }
554  }
555 
556  public static void SwapTabs(String name1, String name2)
557  {
558  //Swap over the config tabs
559  int selected = -1;
560  int toreplace = -1;
561  for (int i = 0; i < _currentConfig.Tabs.Count; ++i)
562  {
563  if (_currentConfig.Tabs[i].Name == name1)
564  {
565  selected = i;
566  }
567 
568  if (_currentConfig.Tabs[i].Name == name2)
569  {
570  toreplace = i;
571  }
572  }
573 
574  if (toreplace != -1 && selected != -1)
575  {
576  Tab temp = _currentConfig.Tabs[selected];
577  _currentConfig.Tabs[selected] = new Seci.Definitions.Tab(_currentConfig.Tabs[toreplace].Name, _currentConfig.Tabs[toreplace].VisibleForUser);
578  _currentConfig.Tabs[toreplace] = temp;
579  }
580  }
581 
586  public static void SetGraphDefinitions(List<GraphDefinition> graphs)
587  {
588  if (graphs != null)
589  {
590  _currentConfig.GraphDefinitions = new SerialisableList<GraphDefinition>();
591  _currentConfig.GraphDefinitions.AddRange(graphs);
592  }
593  }
594 
599  internal static void AddGraphDefinitions(SerialisableList<GraphDefinition> graphs)
600  {
601  if (graphs != null)
602  {
603  if (_currentConfig.GraphDefinitions == null)
604  {
605  _currentConfig.GraphDefinitions = new SerialisableList<GraphDefinition>();
606  }
607 
608  //Only add graphs is the max number is not exceeded
609  for (int i = 0; i < graphs.Count; ++i)
610  {
611  _currentConfig.GraphDefinitions.Add(graphs[i]);
612 
613  if (_currentConfig.GraphDefinitions.Count >= Status.MaxNumberGraphs)
614  {
615  break;
616  }
617  }
618  }
619  }
620 
625  public static List<GraphDefinition> GetGraphDefinitions()
626  {
627  List<GraphDefinition> temp = new List<GraphDefinition>(_currentConfig.GraphDefinitions.ToArray());
628  return temp;
629  }
630 
635  internal static void RemoveComponentGraphs(String compName)
636  {
637  if (_currentConfig.GraphDefinitions != null)
638  {
639  for (int i = _currentConfig.GraphDefinitions.Count - 1; i >= 0; --i)
640  {
641  if (!String.IsNullOrEmpty(_currentConfig.GraphDefinitions[i].OwningComponent) && _currentConfig.GraphDefinitions[i].OwningComponent.ToLower() == compName.ToLower())
642  {
643  _currentConfig.GraphDefinitions.RemoveAt(i);
644  }
645  }
646  }
647  }
648 
649  #endregion
650 
651  #region Old Seci Corrections
652 
659  {
660  //This is to allow configs from old seci to work
661  //Can be removed after old SECI has been completely removed
662  for (int i = 0; i < blocks.Count; ++i)
663  {
664  blocks[i] = correctOldSeciBlock(blocks[i]);
665  }
666 
667  return blocks;
668  }
669 
678  internal static BlockInfo correctOldSeciBlock(BlockInfo block)
679  {
680  try
681  {
682  return LabView.LabViewApp.GetCorrectBlockDetails(block);
683  }
684  catch
685  {
686  return block;
687  }
688  }
689 
690  #endregion
691 
692  public static int[] GetConfigPanelPosition(String filename, Boolean getPrevPosition)
693  {
694  SerialisableList<LabView.LabViewPanelInfo> panels = LabViewMgr.GetAllPanelsInfo();
695 
696  foreach (LabView.LabViewPanelInfo panel in panels)
697  {
698  if (panel.FilePath == filename)
699  {
700  if (getPrevPosition && panel.OldBounds != null)
701  {
702  return panel.OldBounds;
703  }
704  return panel.Bounds;
705  }
706  }
707 
708  return null;
709  }
710 
711  public static void SetConfigPanelPosition(String filename, int x, int y)
712  {
713  SerialisableList<LabView.LabViewPanelInfo> panels = LabViewMgr.GetAllPanelsInfo();
714 
715  foreach (LabView.LabViewPanelInfo panel in panels)
716  {
717  if (panel.FilePath == filename)
718  {
719  panel.OldBounds = panel.Bounds;
720  panel.Bounds = new int[] { x, y };
721  return;
722  }
723  }
724  }
725 
739  internal static int RemoteConfigurationChange(String configName)
740  {
741  String fileName = Status.ConfigDir + configName;
742 
743  //Check config exists
744  FileInfo fi = new FileInfo(fileName);
745 
746  if (!fi.Exists)
747  {
748  return 1;
749  }
750 
751  if (ConfigChangeRequested != null)
752  {
753  String[] vars = { fileName };
754 
755  //Bubble this up to the GUI
756  ConfigChangeRequested(vars);
757 
758  return 0;
759  }
760 
761  return 2;
762  }
763 
768  public static List<String> GetNames()
769  {
770  if (Components != null)
771  {
772  List<String> names = new List<String>();
773 
774  for (int i = 0; i < Components.Count; ++i)
775  {
776  names.Add(Components[i].ConfigName);
777  }
778 
779  return names;
780  }
781 
782  return null;
783  }
784 
789  private static void addBlocks(String compName)
790  {
791  for (int i = 0; i < Components[compName].Blocks.Count; ++i)
792  {
793  Components[compName].Blocks[i].OwningComponent = Components[Components.Count - 1].ConfigName;
794  }
795  BlockMgr.Blocks.AddDictionary(Components[compName].Blocks);
796  //Components[compName].Blocks = null;
797  }
798 
802  public static void LoadComponentsVisExes()
803  {
804  //load VIs and Exes in components
805  if (Components != null)
806  {
807  for (int i = 0; i < Components.Count; ++i)
808  {
809  loadComponentVIs(Components[i].ConfigName);
810  loadComponentExes(Components[i].ConfigName);
811  loadAssocFiles(Components[i].ConfigName);
812  }
813  }
814  }
815 
821  private static void loadComponentVIs(String compName)
822  {
823  FileInfo fi;
824 
825  for (int i = 0; i < Components[compName].LVPanels.Count; ++i)
826  {
827  //Create a reference to the panel to load (just to make the code clearer)
828  Seci.LabView.LabViewPanelInfo Panel = Components[compName].LVPanels[i];
829 
830  //Might be a .llb, check for that
831  if (Panel.FilePath.Substring(0, Panel.FilePath.LastIndexOf('\\')).ToLower().EndsWith(".llb"))
832  {
833  //It is a .llb, so have to remove the .vi bit when checking the file exists
834  fi = new FileInfo(Panel.FilePath.Substring(0, Panel.FilePath.LastIndexOf('\\')));
835  }
836  else
837  {
838  //It is a .vi
839  fi = new FileInfo(Panel.FilePath);
840  }
841 
842  if (fi.Exists)
843  {
844 
845  Panel.OwningComponent = compName; //Set the name for the owning config
846  if (LabView.LabViewApp.LoadVI(Panel, true))
847  {
848  //Show if necessary
849  if (Panel.ShowPanel)
850  {
851  LabView.LabViewApp.ShowVI(Panel.FilePath);
852  }
853 
854  //Start running if necessary
855  if (Panel.StartRunning)
856  {
857  LabView.LabViewApp.StartVI(Panel.FilePath);
858  }
859  }
860  }
861  }
862  }
863 
868  private static void loadComponentExes(String compName)
869  {
870  for (int i = 0; i < Components[compName].Executables.Count; ++i)
871  {
872  Components[compName].Executables[i].OwningComponent = compName;
873  ExecutableMgr.AddExecutable(Components[compName].Executables[i]);
874  }
875  }
876 
882  private static void loadAssocFiles(String compName)
883  {
884  for (int i = 0; i < Components[compName].AssociatedFiles.Count; ++i)
885  {
886  Components[compName].AssociatedFiles[i].OwningComponent = compName;
887  AssocFileMgr.AddFile(Components[compName].AssociatedFiles[i]);
888  AssocFileMgr.RecreateFile(Components[compName].AssociatedFiles[i]);
889  }
890  }
891 
892  }
893 }
SerialisableList< BlockGroup > Groups
static void openConfig(String fileName)
Open a configuration or component. Calls LoadConfig to open the configuration file and create a SeciC...
The manager class for all things component related
Definition: ComponentMgr.cs:11
static List< GraphDefinition > GetGraphDefinitions()
Method for getting the graph definitions from the configuration.
static void loadVIsAndInitialise(SerialisableList< LabView.LabViewPanelInfo > panels)
Loads all (if any) LabVIEW VIs in the configuration when it is opened. Also loads any VIs in any comp...
SerialisableList< String > TabOrder
A serialisable list for containing objects of type SeciConfiguration. This class wraps a standard Lis...
This class is used for storing the information for any blocks that are created and provides methods f...
Definition: BlockInfo.cs:18
static bool groupExists(SerialisableList< BlockGroup > groups, string name)
static List< String > GetNames()
Gets a list of the names of the components that are part of the current configuration.
This class is used for wrapping standard executables that are included as part of a configuration...
Definition: Executable.cs:15
SerialisableList< LabView.LabViewPanelInfo > LVPanels
static void SetGraphDefinitions(List< GraphDefinition > graphs)
Method for adding graph definitions to the configuration for saving.
static void SwapTabs(String name1, String name2)
static Boolean SaveConfiguration(Boolean manager, Boolean autoSave)
Save the current configuration or component with the current user rights.
The manager class for all things executable related
static BlockDictionary Blocks
Definition: BlockMgr.cs:21
Class for holding the standard run-time settings for SECI. A large percentage of the information held...
Definition: Status.cs:12
This class contains all the information that defines the configuration at the SECI level and contains...
static void LoadComponentsVisExes()
Loads the VIs and executables associated to the component
static void addBlocks(String compName)
Set the owning name of the blocks then add to the block dictionary.
static void loadComponentVIs(String compName)
When adding a component to a configuration this method loads all (if any) LabVIEW VIs in the componen...
static Boolean OpenConfiguration(String fileName)
Opens a configuration or component from a xml file.
static void SetConfigPanelPosition(String filename, int x, int y)
The manager class for Block related stuff.
Definition: BlockMgr.cs:11
static ComponentList Components
Definition: ComponentMgr.cs:14
static Boolean OkayToSave(Boolean manager)
Checks that the current user has permission to overwrite the configuration. Uses DotNet XPath methods...
static void loadComponentExes(String compName)
When loading or adding a component this method loads any executables that are part of the ...
static BlockDictionary correctOldSeciBlocks(BlockDictionary blocks)
Method for converting blocks from old SECI in to a format for new Seci.
static RemotingEventHandler ConfigChangeRequested
This event signals that a different configuration has been requested.
static void loadAssocFiles(String compName)
When loading or adding a component this method loads any associated files that are part of the compon...
static void CreateNewConfiguration()
Creates a new configuration or component.
static int MaxNumberGraphs
Definition: Status.cs:113
Specialised version of the Dictionary class which can be converted to XML. Also has some additional s...
static void startVI(Seci.LabView.LabViewPanelInfo Panel)
This method starts the VI and waits a specified number of seconds.
This class contains all the information about a LabVIEW VI that needs to be saved in the configuratio...
static int[] GetConfigPanelPosition(String filename, Boolean getPrevPosition)
static void saveConfig(Boolean manager, Boolean isAutosave)
This method saves the configuration or component in a XML file.
This class is used for storing files as part of a configuration. Typically, the files stored are ini ...
static void SetTabOrder(List< String > tabs)
Method for setting the tab order in the configuration.
delegate void RemotingEventHandler(String[] vars)
This delegate handles any events that come in via the remoting interface that need to be handled by t...
static List< String > GetTabOrder()
Method for getting the tab order from the configuration.
String Name
Definition: Tab.cs:9
The manager class for the configuration
static SerialisableList< Tab > GetTabs()
static void SetTabs(SerialisableList< Tab > tabs)
static void CloseConfiguration(Boolean killIcp)
Closes the configuration - this also kills the LabVIEW process. Whether to kill the ICP...
static void SetTabVisibility(String tabname, Boolean visible)
static Boolean UseDaeMonitorVI
Definition: Status.cs:99
The manager class for associated files.
Definition: AssocFileMgr.cs:11