2 using System.Collections.Generic;
5 namespace Seci.LabView.Controls
18 public LvArray(String name, SerialisableList<int> indices)
24 _clusterIndices = (Seci.SerialisableList<
int>)indices.Clone();
34 return _name +
" (Array)";
47 public override String[]
GetValue(ref strongnameLabview.VirtualInstrument vi)
49 if (_clusterIndices == null)
51 object value = vi.GetControlValue(_name);
53 Type arrType = value.GetType();
54 if (arrType.Name ==
"Double[]")
56 Double[] vals = value as Double[];
57 string[] array = Array.ConvertAll<Double,
string>(vals, delegate(Double obj) {
return obj.ToString(); } );
61 return (String[]) value;
65 return (String[])GetValueFromCluster(vi)[_clusterIndices[_clusterIndices.Count - 1]];
74 public override void SetValue(ref strongnameLabview.VirtualInstrument vi, Object value)
76 if (_clusterIndices == null)
78 vi.SetControlValue(_name, value);
82 SetValueInCluster(ref vi, value);
override String[] GetValue(ref strongnameLabview.VirtualInstrument vi)
Overriden method for getting the values in the Array Control.
override String GetNameAndType()
Overriden method which return the name and type of the control.
This class inherits from LVControl class and is specialised for reading and writing to LabVIEW array ...
override String GetControlType()
LvArray(String name, SerialisableList< int > indices)
Constructor
override void SetValue(ref strongnameLabview.VirtualInstrument vi, Object value)
Overriden method for setting the values in the Array Control.
This class is the abstract base class of the objects used to store the VI control information...