/// <summary> /// Contructor of the main form /// </summary> public Form1() { InitializeComponent(); SdkInfoStruct sdkInfo = SeekwareDevice.GetSdkInfo(); sdkVersionTextBox.Text = string.Format("{0}.{1}", sdkInfo.sdk_version_major, sdkInfo.sdk_version_minor); // populate device list combo box mSeekDeviceList = SeekwareDevice.GetDeviceList(); foreach (var dev in mSeekDeviceList) { selectCameraComboBox.Items.Add(dev.SerialNumber); } // populate temperature units combo box tempUnitsComboBox.DataSource = Enum.GetValues(typeof(SeekwareDevice.SwTemperatureUnits)); tempUnitsComboBox.SelectedItem = SeekwareDevice.SwTemperatureUnits.Celsius; // populate the display lut lutComboBox.DataSource = Enum.GetValues(typeof(SeekwareDevice.SwDisplayLut)); lutComboBox.SelectedItem = SeekwareDevice.SwDisplayLut.Spectra; // set the initial state and start the find devices timer State = ControlStates.Closed; findDevicesTimer.Enabled = true; }
/// <summary> /// Gets the Seekware SDK version /// </summary> /// <returns></returns> public static SdkInfoStruct GetSdkInfo() { SdkInfoStruct sdkInfo = new SdkInfoStruct(); GCHandle sdkInfoHandle = GCHandle.Alloc(sdkInfo, GCHandleType.Pinned); SwReturnCode swReturn = Seekware_GetSdkInfo(ref sdkInfo); sdkInfoHandle.Free(); return(sdkInfo); }
private static extern SwReturnCode Seekware_GetSdkInfo(ref SdkInfoStruct sdkInfo);