public MainWindow() { InitializeComponent(); unit = new eLED.eLED(ip); Thread.Sleep(100); unit.setBrightness(0, 100); Console.WriteLine("Initialized."); IP.Content = ip; }
public void VideoMatcher(eLED.eLED eLED, int zone, int frequency) { var matcher = new ScreenMatcher(); new Thread(() => { matcher.startWatching(); }).Start(); while (videoMatching) { Thread.Sleep(1000 / frequency); if (matcher.color == -1) { eLED.whiteMode(zone); } else { eLED.setColor(zone, matcher.color); } } }