public DebugWindow() { InitializeComponent(); _teensy = new Teensy("COM3"); logic = new Logic(_teensy); ReloadTracks(); RefreshPictureBoxes(); }
public Form1() { InitializeComponent(); _teensy = new Teensy("COM3"); _logic = new Logic(_teensy); captureThread = new Thread(new ParameterizedThreadStart(cv.StartCapturing)); captureThread.Name = "captureThread"; captureThread.Start(_logic); liveViewTimer = new Timer(); liveViewTimer.Interval = 20; liveViewTimer.Tick += new EventHandler(liveViewTimer_Tick); liveViewTimer.Start(); }
public ReplayWindow() { InitializeComponent(); _fakeOutput = new FakeOutput(); logic = new Logic(_fakeOutput); }
public void StartCapturing(object logic) { _logic = (Logic)logic; int fps = 25; writerThread = new Thread(ImageWriter); writerThread.Name = "writerThread"; writerThread.Start(); var videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); _captureDevice = new VideoCaptureDevice(videoDevices[0].MonikerString); _captureDevice.DesiredFrameSize = new Size(704, 576); _captureDevice.DesiredFrameRate = fps; _captureDevice.NewFrame += new AForge.Video.NewFrameEventHandler(camera_NewFrame); _captureDevice.Start(); globFrameCount = 0; globCaptureStart = DateTime.Now; //now capturing }