Пример #1
0
        private static async void UpdateChecks()
        {
            // If we have a launcher installation, check for a Firefall update.
            if (MeldiiSettings.Self.CheckForPatchs && Statics.IsFirefallInstallLauncher())
            {
                await FirefallUpdate();
            }

            // Check for updater.  If it is there and we have a Meldii_New.exe, try running it again.
            // Else, clean up after it.
            if (File.Exists(Statics.UpdaterName))
            {
                if (File.Exists("Meldii_New.exe"))
                {
                    Process.Start(Statics.UpdaterName);
                    App.Current.Dispatcher.Invoke((Action) delegate() { Application.Current.Shutdown(); });
                    return;
                }
                else
                {
                    File.Delete(Statics.UpdaterName);
                }
            }

            // See if there is a Meldii update.
            if (IsUpdateAvailable())
            {
                await App.Current.Dispatcher.BeginInvoke((Action) delegate()
                {
                    MainWindow.UpdatePrompt();
                });
            }
        }
Пример #2
0
        private static async void UpdateChecks()
        {
            // If we have a launcher installation, check for a Firefall update.
            if (MeldiiSettings.Self.CheckForPatchs && Statics.IsFirefallInstallLauncher())
            {
                await FirefallUpdate();
            }

            // Check for updater and remove it if it is there.
            if (File.Exists(Statics.UpdaterName))
            {
                File.Delete(Statics.UpdaterName);
            }

            // See if there is a Meldii update.
            if (IsUpdateAvailable())
            {
                await App.Current.Dispatcher.BeginInvoke((Action) delegate()
                {
                    MainWindow.UpdatePrompt();
                });
            }
        }