SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
LabViewMgr.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 
5 namespace Seci.Managers
6 {
10  public static class LabViewMgr
11  {
17  public static List<String> GetVIControls(String fileName)
18  {
19  return LabView.LabViewApp.GetListOfControls(fileName);
20  }
21 
22  public static Definitions.ControlType GetControlType(String fileName, String control)
23  {
24  String type = LabView.LabViewApp.GetControlTime(fileName, control);
25 
26  if (type == "NUMERIC")
27  {
28  return Seci.Definitions.ControlType.NUMERIC;
29  }
30  else if (type == "BOOLEAN")
31  {
32  return Seci.Definitions.ControlType.BOOLEAN;
33  }
34  else if (type == "STRING")
35  {
36  return Seci.Definitions.ControlType.STRING;
37  }
38  else
39  {
40  return Seci.Definitions.ControlType.UNKNOWN;
41  }
42  }
43 
49  public static int[] GetPanelBounds(String fileName)
50  {
51  return LabView.LabViewApp.GetBounds(fileName);
52  }
53 
59  public static void SetFrontPanelBounds(String fileName, int[] bounds)
60  {
61  LabView.LabViewApp.MoveFrontPanel(fileName, bounds);
62  }
63 
69  public static String GetFrontPanelTitle(String fileName)
70  {
71  return LabView.LabViewApp.GetFrontPanelTitle(fileName);
72  }
73 
78  public static void UpdateFrontPanelTitle(String fileName)
79  {
80  LabView.LabViewApp.UpdateFrontPanelTitle(fileName);
81  }
82 
83  #region Visibility
84 
89  public static void MinimiseVI(String fileName)
90  {
91  LabView.LabViewApp.MinimiseVI(fileName);
92  }
93 
98  public static void RestoreVI(String fileName)
99  {
100  LabView.LabViewApp.RestoreVI(fileName);
101  }
102 
107  public static void ShowVI(String fileName)
108  {
109  LabView.LabViewApp.ShowVI(fileName);
110  }
111 
116  public static void HideVI(String fileName)
117  {
118  LabView.LabViewApp.HideVI(fileName);
119  }
120 
126  public static Boolean IsVIHidden(String fileName)
127  {
128  return LabView.LabViewApp.IsVIHidden(fileName);
129  }
130 
135  public static void SetVisibilityToDefault(String fileName)
136  {
137  LabView.LabViewApp.SetVisibilityToDefault(fileName);
138  }
139 
140  #endregion
141 
147  public static Boolean DoesVIExist(String fileName)
148  {
149  return LabView.LabViewApp.IsVIPresent(fileName);
150  }
151 
157  public static List<String> GetVIsNotLoaded()
158  {
159  return LabView.LabViewApp.VIsNotLoaded;
160  }
161 
167  public static List<String> GetLlbInfo(String fileName)
168  {
169  return LabView.LabViewApp.GetLLBInfo(fileName);
170  }
171 
176  public static void AddVI(LabView.LabViewPanelInfo panel)
177  {
178  LabView.LabViewApp.LoadVI(panel, true);
179  }
180 
185  public static void RemoveVI(String fileName)
186  {
187  LabView.LabViewApp.CloseVI(fileName);
188  }
189 
195  public static List<String> GetListOfVIs(Boolean includeDefault)
196  {
197  return LabView.LabViewApp.GetListOfAllVIs(includeDefault);
198  }
199 
204  public static SerialisableList<LabView.LabViewPanelInfo> GetAllPanelsInfo()
205  {
206  return LabView.LabViewApp.GetAllPanelsInfo();
207  }
208 
213  public static void SetPanelsInfo(SerialisableList<LabView.LabViewPanelInfo> panels)
214  {
215  LabView.LabViewApp.SetPanelsInfo(panels);
216  }
217 
218  public static Boolean IsLabViewRunning()
219  {
220  return LabView.LabViewApp.AreYouThere();
221  }
222 
223  }
224 }
The manager class for interacting with LabVIEW.
Definition: LabViewMgr.cs:10
static Boolean IsVIHidden(String fileName)
Checks whether the VI front panel is hidden.
Definition: LabViewMgr.cs:126
static List< String > GetVIControls(String fileName)
Get a list of the controls on the VI
Definition: LabViewMgr.cs:17
static void SetVisibilityToDefault(String fileName)
Returns the VI to its default visibility as determined by the SECI settings.
Definition: LabViewMgr.cs:135
static SerialisableList< LabView.LabViewPanelInfo > GetAllPanelsInfo()
Get the panel information for all the VIs
Definition: LabViewMgr.cs:204
static void ShowVI(String fileName)
Shows the VI front panel if it was hidden.
Definition: LabViewMgr.cs:107
static Boolean IsLabViewRunning()
Definition: LabViewMgr.cs:218
static Definitions.ControlType GetControlType(String fileName, String control)
Definition: LabViewMgr.cs:22
static void UpdateFrontPanelTitle(String fileName)
Update the stored window title for the front panel of the VI
Definition: LabViewMgr.cs:78
static void RestoreVI(String fileName)
Restores the VI front panel.
Definition: LabViewMgr.cs:98
static void SetFrontPanelBounds(String fileName, int[] bounds)
Set the bound of the front panel. Can be used to move the VI or resize it (not recommended).
Definition: LabViewMgr.cs:59
static List< String > GetListOfVIs(Boolean includeDefault)
Gets a list of all the VIs loaded by SECI
Definition: LabViewMgr.cs:195
static List< String > GetLlbInfo(String fileName)
Get the information about the .llb file.
Definition: LabViewMgr.cs:167
static void HideVI(String fileName)
Hides the VI front panel completely.
Definition: LabViewMgr.cs:116
static void MinimiseVI(String fileName)
Minimises the VI front panel.
Definition: LabViewMgr.cs:89
static List< String > GetVIsNotLoaded()
Gets a list of VIs that SECI failed to load. Used when loading a configuration
Definition: LabViewMgr.cs:157
static Boolean DoesVIExist(String fileName)
Checks whether the VI is present (i.e. has been loaded by SECI)
Definition: LabViewMgr.cs:147
This class contains all the information about a LabVIEW VI that needs to be saved in the configuratio...
static void RemoveVI(String fileName)
Removes a VI from the current configuration and &quot;closes&quot; it.
Definition: LabViewMgr.cs:185
static int[] GetPanelBounds(String fileName)
Get the bounds of the VI
Definition: LabViewMgr.cs:49
static void AddVI(LabView.LabViewPanelInfo panel)
Adds/loads a VI based on the LabViewPanelInfo
Definition: LabViewMgr.cs:176
static String GetFrontPanelTitle(String fileName)
Get the full title of the VI. Needed for the Win32API stuff.
Definition: LabViewMgr.cs:69
static void SetPanelsInfo(SerialisableList< LabView.LabViewPanelInfo > panels)
Set the panel information for the VIs
Definition: LabViewMgr.cs:213