예제 #1
0
 private void AddPictureBox(PictureBox pictureBox)
 {
     if (panelGame.InvokeRequired)
     {
         AddPictureBoxCallback d = new AddPictureBoxCallback(AddPictureBox);
         this.Invoke(d, new object[] { pictureBox });
     }
     else
     {
         panelGame.Controls.Add(pictureBox);
     }
 }
예제 #2
0
 private void AddPictureBox(PictureBox text)
 {
     // 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.txtForward.InvokeRequired)
     {
         AddPictureBoxCallback d = new AddPictureBoxCallback(AddPictureBox);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         this.pnlMap.Controls.Add(text);
     }
 }
예제 #3
0
파일: Form1.cs 프로젝트: Xsichtik/Bomberman
 private void AddPictureBox(PictureBox pictureBox)
 {
     if (panelGame.InvokeRequired)
     {
         AddPictureBoxCallback d = new AddPictureBoxCallback(AddPictureBox);
         this.Invoke(d, new object[] { pictureBox });
     }
     else
     {
         panelGame.Controls.Add(pictureBox);
     }
 }
예제 #4
0
 private void AddPictureBox(PictureBox text)
 {
     // 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.txtForward.InvokeRequired)
     {
         AddPictureBoxCallback d = new AddPictureBoxCallback(AddPictureBox);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         this.pnlMap.Controls.Add(text);
     }
 }