コード例 #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();
        }
コード例 #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);
            });
        }
コード例 #3
0
        private async void GetUserSettings()
        {
            string AutoPath = GetGameFiles();

            if (string.IsNullOrEmpty(FProp.Default.FPak_Path) && DatFileExists() && AutoPath != null)
            {
                FProp.Default.FPak_Path   = AutoPath;
                RegisterFromPath.PAK_PATH = AutoPath;
                RegisterFromPath.FilterPAKs();
                new UpdateMyProcessEvents("Process events", "State").Update();
            }


            InputTextBox.Text       = FProp.Default.FPak_Path;
            bDiffFileSize.IsChecked = FProp.Default.FDiffFileSize;
            OutputTextBox.Text      = FProp.Default.FOutput_Path;
            bReloadAES.IsChecked    = FProp.Default.ReloadAES;
            bOpenSounds.IsChecked   = FProp.Default.FOpenSounds;

            ComboBox_Language.SelectedIndex = (int)GetEnumValueFromDescription <LIndexes>(FProp.Default.FLanguage);
            ComboBox_Design.SelectedIndex   = (int)GetEnumValueFromDescription <RIndexes>(FProp.Default.FRarity_Design);

            bFeaturedIcon.IsChecked  = FProp.Default.FIsFeatured;
            bWatermarkIcon.IsChecked = FProp.Default.FUseWatermark;
            Watermark_Label.Content += Path.GetFileName(FProp.Default.FWatermarkFilePath);

            Opacity_Slider.Value = FProp.Default.FWatermarkOpacity;
            Scale_Slider.Value   = FProp.Default.FWatermarkScale;
            xPos_Slider.Value    = FProp.Default.FWatermarkXPos;
            yPos_Slider.Value    = FProp.Default.FWatermarkYPos;

            WatermarkChallenge_TextBox.Text = FProp.Default.FChallengeWatermark;
            bCustomChallenge.IsChecked      = FProp.Default.FUseChallengeWatermark;
            Banner_Label.Content           += Path.GetFileName(FProp.Default.FBannerFilePath);
            OpacityBanner_Slider.Value      = FProp.Default.FBannerOpacity;

            await UpdateImageWithWatermark();

            UpdateChallengeCustomTheme();
        }