private void colorCaptured() { colorHistory.Insert(0, CurrentColor.WpfColor); if (Settings.Default.ClipboardAutoCopy) { Clipboard.SetText(CurrentColor.HexString); } }
private void OnHotKeyCaptureColorTimelapseHandler(HotKey obj) { var count = 0; var timer = new Timer { Interval = _colorPickerInterval }; // Capture just a single pixel to speed up msc.StartSinglePixelCapturing(); timer.Tick += ((s, e) => { lastColors.Insert(0, CurrentColor.WpfColor); if (count++ == _colorPickerNoColors) { timer.Stop(); // Go back to normal capturing msc.StartCapturing(); } }); timer.Start(); }