Example #1
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            FModelVersionLabel.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 5);

            AutoUpdater.CheckForUpdateEvent += UIHelper.AutoUpdaterOnCheckForUpdateEvent;
            AutoUpdater.Start("https://dl.dropbox.com/s/3kv2pukqu6tj1r0/FModel.xml?dl=0");

            // Copy user settings from previous application version if necessary
            if (FProp.Default.FUpdateSettings)
            {
                FProp.Default.Upgrade();
                FProp.Default.FUpdateSettings = false;
                FProp.Default.Save();
            }

            await Task.Run(() =>
            {
                FoldersUtility.LoadFolders();
                FoldersUtility.CheckWatermark();
                RegisterFromPath.FilterPAKs();
                DynamicKeysChecker.SetDynamicKeys();
                RegisterDownloadedBackups.LoadBackupFiles();
            }).ContinueWith(TheTask =>
            {
                TasksUtility.TaskCompleted(TheTask.Exception);
            });

            AvalonEdit.SetAEConfig();
        }
Example #2
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            FModelVersionLabel.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 5);

            DebugHelper.WriteLine("AutoUpdater: Checking for updates");
            AutoUpdater.CheckForUpdateEvent += UIHelper.AutoUpdaterOnCheckForUpdateEvent;
            AutoUpdater.Start("https://cdn.asval.tk/d/FModel/FModel.xml");

            DebugHelper.WriteUserSettings();

            await Task.Run(() =>
            {
                FoldersUtility.CheckWatermark();
                RegisterFromPath.CheckFortniteVersion();
                RegisterFromPath.FilterPAKs();
                DynamicKeysChecker.SetDynamicKeys();
                RegisterDownloadedBackups.LoadBackupFiles();
            }).ContinueWith(TheTask =>
            {
                TasksUtility.TaskCompleted(TheTask.Exception);
                Dispatcher.InvokeAsync(() => AvalonEdit.SetAEConfig());
                Program.StartTimer.Stop();
                DebugHelper.WriteLine("Startup time: {0} ms", Program.StartTimer.ElapsedMilliseconds);
            });
        }