Exemplo n.º 1
0
        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;
                }

            }
       
        }
Exemplo n.º 2
0
        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;
                }
            }
        }