Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string prenom = tbPrenom.Text;
            string nom    = tbNom.Text;

            string[] strBirthday     = dpNaissance.Text.Split('/');
            DateTime birthday        = new DateTime(int.Parse(strBirthday[2]), int.Parse(strBirthday[1]), int.Parse(strBirthday[0]));
            Country  nationality     = Session.Instance.Game.kernel.String2Country("France");
            Country  selectedCountry = cbNationalite.SelectedItem as Country;

            if (selectedCountry != null)
            {
                nationality = selectedCountry;
            }

            if (club != null)
            {
                Session.Instance.Game.club = club as CityClub;
                Manager manager = new Manager(prenom, nom, 70, birthday, nationality);
                Session.Instance.Game.club.ChangeManager(manager);
                Windows_Menu wm = new Windows_Menu();
                wm.Show();
                Close();
            }
        }
Пример #2
0
        private void BtnChargerPartie_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "The Manager Save|*.csave";
            if (openFileDialog.ShowDialog() == true)
            {
                Game p = new Game();
                p.Load(openFileDialog.FileName);
                Session.Instance.Game = p;
                Windows_Menu wm = new Windows_Menu();
                wm.Show();
            }
        }