Exemple #1
0
 private void ShowReceivedScreenshot(Image screenShot)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.pictureBox.InvokeRequired)
     {
         ShowReceivedScreenshotCallback d = new ShowReceivedScreenshotCallback(ShowReceivedScreenshot);
         this.Invoke(d, new object[] { screenShot });
     }
     else
     {
         this.pictureBox.Image = screenShot;
     }
 }
Exemple #2
0
 private void ShowReceivedScreenshot(Image screenShot)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.pictureBox.InvokeRequired)
     {
         ShowReceivedScreenshotCallback d = new ShowReceivedScreenshotCallback(ShowReceivedScreenshot);
         this.Invoke(d, new object[] { screenShot });
     }
     else
     {
         this.pictureBox.Image = screenShot;
     }
 }