Exemplo n.º 1
0
        public FContrast(ChangeTracker changeTracker)
        {
            this.changeTracker = changeTracker;
            InitializeComponent();

            ContrastTransform = new ContrastTransform();
        }
Exemplo n.º 2
0
 private void UpdatePreviewBox()
 {
     if (previewTimer == null)
     {
         previewTimer = new Timer((obj) =>
         {
             if (previewOutOfDate && !working)
             {
                 working          = true;
                 previewOutOfDate = false;
                 var result       = ContrastTransform.Perform((Bitmap)workingImage.Clone());
                 Invoke(new MethodInvoker(() =>
                 {
                     if (pictureBox.Image != null)
                     {
                         pictureBox.Image.Dispose();
                     }
                     pictureBox.Image = result;
                 }));
                 working = false;
             }
         }, null, 0, 100);
     }
     previewOutOfDate = true;
 }
Exemplo n.º 3
0
 private void btnRevert_Click(object sender, EventArgs e)
 {
     ContrastTransform = new ContrastTransform();
     tbContrast.Value  = 0;
     txtContrast.Text  = tbContrast.Value.ToString("G");
     UpdatePreviewBox();
 }