Пример #1
0
 private void colorCaptured()
 {
     colorHistory.Insert(0, CurrentColor.WpfColor);
     if (Settings.Default.ClipboardAutoCopy)
     {
         Clipboard.SetText(CurrentColor.HexString);
     }
 }
Пример #2
0
        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();
        }