private void ButLoad_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*"; openFileDialog1.ShowDialog(); if (result != DialogResult.OK) { string file = openFileDialog1.FileName; GameController.SavedGame = true; GameController.SavedGameFile = openFileDialog1.FileName; InGameHome home = new InGameHome(); home.Show(); this.Hide(); } }
private void ButContinue_Click(object sender, EventArgs e) { //var allTeams = DataManager.LoadAllTeams(); //var manager = DataManager.LoadManager(); //var managers = manager.ManagerAttributes.Where(man => man.Name != null); string managername = controller.GameObjects.ManagerEntity.Name; string clubname = controller.GameObjects.ManagerEntity.AssignedClub; string PNation = controller.GameObjects.ManagerEntity.PrimaryNationality; string SNation = controller.GameObjects.ManagerEntity.SecondaryNationality; string PLang = controller.GameObjects.ManagerEntity.PrimaryLanguage; string SLang = controller.GameObjects.ManagerEntity.SecondaryLanguage; DateTime DOB = controller.GameObjects.ManagerEntity.DateOfBirth; controller.GameObjects.ManagerEntity.Attacking = AttackCoaching.Value; controller.GameObjects.ManagerEntity.Defending = DefCoaching.Value; controller.GameObjects.ManagerEntity.GoalKeeping = GoalkeepingCoaching.Value; controller.GameObjects.ManagerEntity.Mental = MentalCoaching.Value; controller.GameObjects.ManagerEntity.Tactical = TacticalCoaching.Value; controller.GameObjects.ManagerEntity.YouthDev = YouthDevelopment.Value; controller.GameObjects.ManagerEntity.Technical = TechnicalCoaching.Value; controller.GameObjects.ManagerEntity.Fitness = FitnessCoaching.Value; controller.GameObjects.ManagerEntity.Motivating = Motivating.Value; controller.GameObjects.ManagerEntity.Determination = DeterminationManager.Value; controller.GameObjects.ManagerEntity.PlayerKnowledge = PlayerKnowledge.Value; controller.GameObjects.ManagerEntity.Discpline = LvlOfDiscipline.Value; controller.GameObjects.ManagerEntity.Adaptability = Adaptablity.Value; controller.GameObjects.ManagerEntity.WorkRateManager = WorkRateManager.Value; controller.GameObjects.ManagerEntity.MediaHandling = MediaHandling.Value; //This sets each of the Manager's attribute values to the progress bar associated with the attribute. saveFileDialog1.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*"; saveFileDialog1.ShowDialog(); InGameHome HomeScreen = new InGameHome(); HomeScreen.Show(); this.Hide(); this.Hide(); }
private void ButMenuHome_Click(object sender, EventArgs e) { InGameHome fhome = new InGameHome(); fhome.Show(); this.Hide(); }