Exemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            fileRepo = RepoFactory.GetFileRepo();

            culture    = fileRepo.LoadCulture();
            windowSize = fileRepo.LoadWindowSize();
            homeTeam   = fileRepo.LoadFavoriteCountry();
            awayTeam   = fileRepo.LoadAwayCountry();

            if (culture.Length == 0 || windowSize.Length == 0)
            {
                CultureSelect cultureSelect = new CultureSelect();
                cultureSelect.Show();
            }
            else if (homeTeam.Count == 0 || awayTeam.Count == 0)
            {
                CountrySelect countrySelect = new CountrySelect();
                countrySelect.Show();
            }
            else
            {
                MainWindow mw = new MainWindow();
                mw.Show();
            }
        }
Exemplo n.º 2
0
        private void newTeam_Click(object sender, RoutedEventArgs e)
        {
            callClose = false;
            CountrySelect cs = new CountrySelect();

            cs.Show();
            this.Close();
        }
Exemplo n.º 3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string selectedLanguage = cb_Language.SelectedItem.ToString();
            string selectedSize     = cb_size.SelectedItem.ToString();

            if (selectedLanguage == LANGUAGE_CROATIAN)
            {
                FileRepo.SaveCulture(LANGUAGE_CROATIAN_SHORT);
                Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(LANGUAGE_CROATIAN_SHORT);
            }
            else
            {
                FileRepo.SaveCulture(LANGUAGE_ENGLISH_SHORT);
                Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(LANGUAGE_ENGLISH_SHORT);
            }

            FileRepo.SaveWindowSize(selectedSize);


            CountrySelect cs = new CountrySelect();

            cs.Show();
            this.Close();
        }