Ejemplo n.º 1
0
 public static MainForm GetInstance()
 {
     if (instance == null)
     {
         instance = new MainForm();
     }
     return instance;
 }
Ejemplo n.º 2
0
        public void setFormState(MainForm form)
        {
            switch(form._phase){
                case MainFormPhase.Login:
                    setStatePanel(this.loginPanel);
                    logoutButton.Text = "Logout";// +" : " + LocalPlayer.Login;
                    break;
                case MainFormPhase.Registering:
                    setStatePanel(this.registerPanel);

                    break;
                case MainFormPhase.Starting:
                    setStatePanel(this.startPanel);
                    logoutButton.Text = "Logout" + " : " + LocalPlayer.Login;
                    break;
                case MainFormPhase.GAMING:
                    setStatePanel(this.gamePanel);
                    break;
                default:
                    setStatePanel(this.loginPanel);
                    break;
            }
        }