Пример #1
0
        public MainForm()
        {
            //Locales
            this.Locales = new System.Resources.ResourceManager("ItemCreator.Resources.winFormStrings", typeof(MainForm).Assembly);

            SplashScreen splash = new SplashScreen();

            splash.Show();
            splash.updateState(Locales.GetString("splash_loading"), 0);

            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Properties.Settings.Default.language);
            InitializeComponent();

            //Set language Menu
            this.setLanguagesMenu();

            //Hole alle Daten aus base.xml und lade sie in das From
            splash.updateState(Locales.GetString("splash_loading_xml"), 25);
            bool loadComboBoxesCheck = loadComboBoxes();

            //if (loadComboBoxesCheck == false) Application.ExitThread();

            splash.updateState(Locales.GetString("splash_loading_preferences"), 50);
            loadPreferences();

            splash.updateState(Locales.GetString("splash_checking_mysql_settings"), 75);
            setMysqlConnection();

            //Überprüfe nach neuen Verisonen wenn erwünscht
            if (basicRow.checkApplicationUpdates || basicRow.checkDatabaseUpdates)
            {
                splash.updateState(Locales.GetString("splash_checking_versions"), 85);

                updaterForm updater = new updaterForm(this);
                updater.checkVersions();
                if ((basicRow.checkApplicationUpdates && updater.IsNewApplicationVersionAvailable()) || (basicRow.checkDatabaseUpdates && updater.IsNewDatabaseUpdateAvailable()))
                {
                    //Message: New versions of Application or Databases are available!
                    MessageBox.Show(Locales.GetString("updater_new_versions_are_available"), Locales.GetString("updater_new_versions_are_available_title"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                updater.Dispose();
            }

            splash.updateState(Locales.GetString("splash_starting"), 100);
            splash.Close();
            splash.Dispose();

            this.versionInformation.Text = "v" + Application.ProductVersion;
        }
Пример #2
0
        public MainForm()
        {
            //Locales
            this.Locales = new System.Resources.ResourceManager("ItemCreator.Resources.winFormStrings", typeof(MainForm).Assembly);

            SplashScreen splash = new SplashScreen();
            splash.Show();
            splash.updateState(Locales.GetString("splash_loading"), 0);

            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Properties.Settings.Default.language);
            InitializeComponent();

            //Set language Menu
            this.setLanguagesMenu();

            //Hole alle Daten aus base.xml und lade sie in das From
            splash.updateState(Locales.GetString("splash_loading_xml"), 25);
            bool loadComboBoxesCheck = loadComboBoxes();
            //if (loadComboBoxesCheck == false) Application.ExitThread();

            splash.updateState(Locales.GetString("splash_loading_preferences"), 50);
            loadPreferences();

            splash.updateState(Locales.GetString("splash_checking_mysql_settings"), 75);
            setMysqlConnection();

            //Überprüfe nach neuen Verisonen wenn erwünscht
            if (basicRow.checkApplicationUpdates || basicRow.checkDatabaseUpdates)
            {
                splash.updateState(Locales.GetString("splash_checking_versions"), 85);

                updaterForm updater = new updaterForm(this);
                updater.checkVersions();
                if ((basicRow.checkApplicationUpdates && updater.IsNewApplicationVersionAvailable()) || (basicRow.checkDatabaseUpdates && updater.IsNewDatabaseUpdateAvailable()))
                {
                    //Message: New versions of Application or Databases are available!
                    MessageBox.Show(Locales.GetString("updater_new_versions_are_available"), Locales.GetString("updater_new_versions_are_available_title"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                updater.Dispose();
            }

            splash.updateState(Locales.GetString("splash_starting"), 100);
            splash.Close();
            splash.Dispose();

            this.versionInformation.Text = "v" + Application.ProductVersion;
        }