public Form1() { InitializeComponent(); cam = new ThermalCamera(true); discovery = new Discovery(); counter_refresh = 0; ComPort = new SerialPort(); ComPort.BaudRate = 115200; ComPort.WriteTimeout = 1000; ComPort.ReadTimeout = 1000; // Create timer to update our UI. _updateGuiTimer = new System.Windows.Forms.Timer { Interval = 100 }; _updateGuiTimer.Tick += _updateGuiTimer_Tick; _updateGuiTimer.Start(); }
public int init() { _discovery = new Discovery(); _camera = new ThermalCamera(); _discovery.DeviceFound += _discovery_DeviceFound; _discovery.Start(Interface.Gigabit); while (!_camera.ConnectionStatus.Equals(ConnectionStatus.Connected)) { ; } Console.WriteLine("camera connected"); // _camera.RemoteControl.Focus.SetDistance(0.3); //snapShot(); return(0); }