Exemplo n.º 1
0
 public void LuaF_NP2832C_SetLambda(string InstrumentName, string NP2832C_EnumChannel, int nLambda)
 {
     if (CheckArgs("LuaF_NP2832C_SetActiveChannel", new List <object>()
     {
         typeof(string), InstrumentName, typeof(string), NP2832C_EnumChannel, typeof(int), nLambda
     }))
     {
         try
         {
             if (InstrumentDic.Keys.Contains(InstrumentName))
             {
                 Newport2832C NP2832C   = InstrumentDic[InstrumentName] as Newport2832C;
                 var          enumInfo  = GetEnumInfo(typeof(Newport2832C.EnumChannel), "NP2832C");
                 var          values    = from kp in enumInfo.Value where kp.Key == NP2832C_EnumChannel select kp.Value;
                 var          enumValue = (Newport2832C.EnumChannel)values.ElementAt(0);
                 int          snap      = NP2832C.MetaProperties[values.ElementAt(0)].Lambda;
                 NP2832C.SetLambda(enumValue, nLambda);
             }
             else
             {
                 StopScrip(string.Format("Can't find instrument{0}", InstrumentName));
             }
         }
         catch (Exception ex)
         {
             StopScrip(string.Format("Unable to set unit, {0}", ex.Message));
         }
     }
 }
Exemplo n.º 2
0
 public ViewNewport2832C(Newport2832C DeviceInstance)
 {
     this.InstrInstance = DeviceInstance;
 }