Esempio n. 1
0
 void ClearPreview()
 {
     renderer.CancelAsync();
     lock ( redrawLock ) {
         previewImage  = null;
         preview.Image = null;
     }
 }
Esempio n. 2
0
        void ClearPreview()
        {
            string stack = Environment.StackTrace;

            Debug.WriteLine("ClearPreview() @ " + stack.Substring(0, stack.IndexOf("at System.Windows.Forms.Control.WndProc")));
            renderer.CancelAsync();
            lock ( redrawLock ) {
                previewImage  = null;
                preview.Image = null;
            }
        }
Esempio n. 3
0
 void Redraw(bool drawAgain)
 {
     lock ( redrawLock ) {
         progressBar.Visible = true;
         progressBar.Style   = ProgressBarStyle.Continuous;
         if (bwRenderer.IsBusy)
         {
             renderer.CancelAsync();
             bwRenderer.CancelAsync();
             while (bwRenderer.IsBusy)
             {
                 Thread.Sleep(1);
                 Application.DoEvents();
             }
         }
         if (drawAgain)
         {
             renderer.Rotation = previewRotation;
             bwRenderer.RunWorkerAsync();
         }
     }
 }