private void GoNewState() { PrepareGameState = PrepareGameStates.NewGame; objGetData = new GetData(); GoCreateCharState(); GoPlayGameState(); }
private void GoLoadState() { PrepareGameState = PrepareGameStates.LoadGame; bool blnSuccess = true; try { using (Stream objFileStream = File.OpenRead(strSaveFile)) { objGetData = (GetData)(objSerializer.Deserialize(objFileStream)); } } catch (Exception e) { blnSuccess = false; lblOutput.Text = string.Format("Failed loading file {0}", strSaveFile); } if (blnSuccess) { lblOutput.Text = lblOutput.Text + "Game loaded."; GoPlayGameState(); } else { GoInitialState(); } }