SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
UserDetails.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using Seci.Definitions;
5 
6 namespace Seci.Standard
7 {
11  public static class UserDetails
12  {
13  private static String _filePath;
14 
15  public static String FilePath { get { return _filePath; } }
16 
17  public static void Initialise()
18  {
19  _filePath = Status.UserDetailsVI;
20 
21  //Load VI
22  LabView.LabViewApp.LoadVI(_filePath, true);
23 
24  //Start it running
25  LabView.LabViewApp.StartVI(_filePath);
26  }
27 
31  public static void ShowVi()
32  {
33  LabView.LabViewApp.ShowVI(_filePath);
34  }
35 
39  public static void HideVi()
40  {
41  LabView.LabViewApp.HideVI(_filePath);
42  }
43 
48  public static String GetRbNumber()
49  {
50  String[] vals = null;
51 
52  try
53  {
54  vals = LabView.LabViewApp.GetValue(_filePath, "RB Number");
55  }
56  catch
57  {
58  }
59 
60  if (vals != null && vals.Length > 0)
61  {
62  return vals[0];
63  }
64  else
65  {
66  return "-1";
67  }
68  }
69 
74  public static void SetRbNumber(String rb)
75  {
76  LabView.LabViewApp.SetValue(_filePath, "RB Number", rb);
77  }
78 
83  public static String[,] GetUsers()
84  {
85  try
86  {
87  Object val = LabView.LabViewApp.GetRawValue(_filePath, "Experimental Team");
88 
89  return (String[,])val;
90  }
91  catch
92  {
93  return null;
94  }
95  }
96 
101  public static void SetUsers(String[,] values)
102  {
103  LabView.LabViewApp.SetRawValue(_filePath, "Experimental Team", values);
104  }
105  }
106 }
static void HideVi()
Method for hiding the VI - it is hidden by default.
Definition: UserDetails.cs:39
static void ShowVi()
Method for showing the VI - it is hidden by default.
Definition: UserDetails.cs:31
static String _filePath
Definition: UserDetails.cs:13
static void SetRbNumber(String rb)
Method for settiing the RB number.
Definition: UserDetails.cs:74
static String GetRbNumber()
Method for retrieving the RB number.
Definition: UserDetails.cs:48
static String[,] GetUsers()
Method for retrieving the users associated with the current RB number.
Definition: UserDetails.cs:83
static void SetUsers(String[,] values)
Method for updating the list of experimenters.
Definition: UserDetails.cs:101
This class is a wrapper for the User Details VI.
Definition: UserDetails.cs:11
static void Initialise()
Definition: UserDetails.cs:17