private void LoginDialog() { bool Continue = true; _LoginDialog = new ConnectDialog(); while (Continue) { _LoginDialog.ShowDialog(); switch (_LoginDialog.DialogResult) { case DialogResult.Cancel: Continue = false; return; case DialogResult.OK: Continue = false; GameFramework.Instance().Run(this, (IGameControl)this); break; } } }
private void LoginDialog() { bool Continue = true; _LoginDialog = new ConnectDialog(); while (Continue) { _LoginDialog.ShowDialog(); switch (_LoginDialog.DialogResult) { case DialogResult.Cancel: Continue = false; QuitApplication(); return; case DialogResult.OK: Continue = false; ReadSimulationModel(DDD_Global.Instance.HostName); //ReadSimulationModel(); SubscribeToEvents(); GameFramework.Instance().Run(this, (IGameControl)this); _ControllerThread = new Thread(new ParameterizedThreadStart(Controller_Thread)); _ControllerThread.Start(this); _DecisionMakerDialog = new DM_Dialog(_Controller); Authenticate(); break; } } }