Beispiel #1
0
        private void ReInitialize()
        {
            runColor = FigureColor.WHITE;
            matrix = new CoreMatrix();
            playWindow = new PlayWindow(this, "Chess", new GuiMatrix(matrix));
            playWindow.FormClosed += new FormClosedEventHandler(PlayWindowClose);

            inviteWindow = new InviteWindow(pCollection);
            inviteWindow.OnChoice += new InviteWindow.OnChoiceEventHandler(InviteWindowMessageReceived);
            inviteWindow.Show();
        }
Beispiel #2
0
        public void Initialize()
        {
            matrix = new CoreMatrix();
            playWindow = new PlayWindow(this, "Chess", new GuiMatrix(matrix));
            playWindow.FormClosed += new FormClosedEventHandler(PlayWindowClose);

            PlayerClock = new System.Windows.Forms.Timer();
            PlayerClock.Tick += new EventHandler(PlayerClock_Tick);
            PlayerClock.Interval = 1000;

            inviteWindow = new InviteWindow(pCollection);
            inviteWindow.OnChoice += new InviteWindow.OnChoiceEventHandler(InviteWindowMessageReceived);
            inviteWindow.Show();
            Application.Run();
        }
Beispiel #3
0
        //for console game start initialization
        public void Initialize(string ip)
        {
            matrix = new CoreMatrix();
            playWindow = new PlayWindow(this, "Chess", new GuiMatrix(matrix));
            playWindow.FormClosed += new FormClosedEventHandler(PlayWindowClose);

            PlayerClock = new System.Windows.Forms.Timer();
            PlayerClock.Tick += new EventHandler(PlayerClock_Tick);
            PlayerClock.Interval = 1000;

            if (ip == "0.0.0.0")
                StartServer();
            else
                StartClient(ip);

            PlayerClock.Start();
            playWindow.Show();

            Debug.NewMessage("play window show");

            Application.Run();
        }