public static Spectrometer ConnectToFirstDevice() { Spectrometer spectrometer = null; try { var ooIds = OceanOptics.EnumerateOceanOpticsDeviceIDs(); if (ooIds.Count > 0) { spectrometer = new OceanOptics(ooIds[0]); } } catch (Exception ex) { } if (spectrometer == null) //если OceanOptics не был подключен { spectrometer = Avesta.Connect(0); } if (spectrometer == null) { throw new Exception("No connected devices"); } return(spectrometer); }
public static Avesta ConnectToFitstDevice() { Avesta av = new Avesta(0); av.Connect(); return(av); }
public static Avesta Connect(int deviceID) { Avesta av = new Avesta(deviceID); return(av); }