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(); }
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(); }
//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(); }