Example #1
0
 public void SetPicture(Image img)
 {
     if (this.label1.InvokeRequired)
     {
         SetPictureCallback t = new SetPictureCallback(SetPicture);
         this.Invoke(t, img);
     }
     else
     {
         this.pictureBox1.Image = img;
     }
 }
Example #2
0
 public static void SetPicture(PBForm form, Image image)
 {
     if (form.InvokeRequired)
     {
         SetPictureCallback d = SetPicture;
         form.Invoke(d, form, image);
     }
     else
     {
         form.pictureBox1.Image = image;
         form.pictureBox1.Refresh();
     }
 }
Example #3
0
        private void LogoRandomizer(Image logo)
        {
            if (this.pictureBox1.InvokeRequired)
            {
                SetPictureCallback p = new SetPictureCallback(LogoRandomizer);
                this.Invoke(p, new object[] { logo });
            }
            else
            {
                this.pictureBox1.Image = logo;
            }

            EmptyWorkingSet(Process.GetCurrentProcess().Handle);
        }
Example #4
0
 private void SetPicture(Bitmap bmp)
 {
     if (liveCamVideo.InvokeRequired)
     {
         SetPictureCallback d = new SetPictureCallback(SetPicture);
         if (!stopping && bmp != null)
         {
             Invoke(d, bmp); // new object[] { bmp });
         }
     }
     else
     {
         liveCamVideo.Image = bmp;    //display incomming data in the text box
     }
 }
Example #5
0
 public void SetPicture(Image img)
 {
     if (this.label1.InvokeRequired)
     {
         SetPictureCallback t = new SetPictureCallback(SetPicture);
         this.Invoke(t, img);
     }
     else
     {
         this.pictureBox1.Image = img;
     }
 }
Example #6
0
        private void CipUpdateEditorState()
        {
            if (this._bNeedUpdate)
            {
                // 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._pictureBoxModifyed.InvokeRequired)
                {
                    SetPictureCallback d = new SetPictureCallback(CipUpdateEditorState);
                    this._pictureBoxModifyed.Invoke(d);
                }
                else
                { 
                    this._pictureBoxModifyed.Image = _currentBitmap;
                }
            }
        }