예제 #1
0
        /// <summary>
        /// khởi tạo
        /// </summary>
        public Form1()
        {
            InitializeComponent();
            btnArray = new Button[] { button1, button2, button3, button4 };
            foreach (Button b in btnArray)
            {
                b.BackColor = Color.FromArgb(97, 16, 186);
            }

            //
            EnableChoice = false;

            //
            hostBox = new ListBox();
            hostBox.Location = new Point(16, 40);
            hostBox.Size = new Size(240, 120);
            hostBox.Visible = true;
            //
            IDtextBox = new TextBox();
            IDtextBox.Location = new Point(96, 160);
            IDtextBox.Size = new Size(160, 20);
            IDtextBox.Visible = true;
            //
            lbName = new Label();
            lbName.Location = new Point(16, 162);
            lbName.Text = "Enter your name:";
            lbName.Size = new Size(120, 20);
            lbName.Visible = true;
            //
            client = new PlayerClient(this);
            //
            TurnPlayModeOn = false;
            panel1.Visible = false;
        }
예제 #2
0
 public Form1()
 {
     InitializeComponent();
     client = new PlayerClient("127.0.0.1", this);
 }