Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            enginePipe = new pipe();
            //this.Show();

            //MessageBox.Show("Press OK to start waiting for engine to connect...");
            connectionThread = new Thread(initForm);
            connectionThread.Start();
            connectionThread.IsBackground = true;

            //initForm();
        }
Пример #2
0
 public void initForm(bool white, pipe pipe)
 {
     this.p     = pipe;
     this.color = white;
     if (white)
     {
         Queen.BackgroundImage  = Properties.Resources.q_white;
         Rook.BackgroundImage   = Properties.Resources.r_white;
         Bishop.BackgroundImage = Properties.Resources.b_white;
         Knight.BackgroundImage = Properties.Resources.n_white;
     }
     else
     {
         Queen.BackgroundImage  = Properties.Resources.q_black;
         Rook.BackgroundImage   = Properties.Resources.r_black;
         Bishop.BackgroundImage = Properties.Resources.b_black;
         Knight.BackgroundImage = Properties.Resources.n_black;
     }
     Queen.Click  += chooseButton;
     Rook.Click   += chooseButton;
     Bishop.Click += chooseButton;
     Knight.Click += chooseButton;
 }