Beispiel #1
0
 public bool Release()
 {
     try
     {
         OceanOpticsWrapper.closeAllSpectrometers();
         IsConnected = false;
         return(true);
     }
     catch (Exception except)
     {
         return(false);
     }
 }
 public bool Release()
 {
     try
     {
         OceanOpticsWrapper.closeAllSpectrometers();
         IsConnected = false;
         return(true);
     }
     catch (Exception except)
     {
         COMMON.Log.Error("Spectrometer :: Release " + except.ToString());
         return(false);
     }
 }
Beispiel #3
0
        private void UpdateSpectrometerList()               // update combobox with available sepctrometers
        {
            string[] specs = new string[100];               // generate helper string, lenght 100 check for better solution

            wrapper.closeAllSpectrometers();                // close all spectrometer has to be called befor open, see API Docs
            wrapper.openAllSpectrometers();
            numberOfSpectrometers = wrapper.getNumberOfSpectrometersFound();

            if (numberOfSpectrometers != 0)                 // populate combobox
            {
                for (int i = 0; i < numberOfSpectrometers; i++)
                {
                    specs[i] = wrapper.getFirmwareModel(i);
                }
                comboBoxSpectrometer.DataSource    = specs;
                comboBoxSpectrometer.SelectedIndex = 0;
                selectedSpectrometer = 0;
            }
            else
            {
                MessageBox.Show("No Spectrometers attached");
            }
        }
Beispiel #4
0
 public void closeSpectrometers()
 {
     spectrometor.closeAllSpectrometers();
 }