private async Task Init() { await PaksGrabber.PopulateMenu().ConfigureAwait(false); await AesGrabber.Load(Properties.Settings.Default.ReloadAesKeys).ConfigureAwait(false); await CdnDataGrabber.DoCDNStuff().ConfigureAwait(false); }
private async Task Init() { await PaksGrabber.PopulateMenu().ConfigureAwait(false); if (Properties.Settings.Default.UseDiscordRpc) { DiscordIntegration.StartClient(); } await AesGrabber.Load(Properties.Settings.Default.ReloadAesKeys).ConfigureAwait(false); await CdnDataGrabber.DoCDNStuff().ConfigureAwait(false); }
private async void OnLoaded(object sender, RoutedEventArgs e) { FModelVersion_TxtBlck.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 5); FModel_StsBar.DataContext = StatusBarVm.statusBarViewModel; FModel_AvalonEdit.DataContext = AvalonEditVm.avalonEditViewModel; FModel_ImgBox.DataContext = ImageBoxVm.imageBoxViewModel; FModel_PakProps.DataContext = PakPropertiesVm.pakPropertiesViewModel; FModel_AssetProps.DataContext = AssetPropertiesVm.assetPropertiesViewModel; FModel_Extract_Btn.DataContext = ExtractStopVm.extractViewModel; FModel_Stop_Btn.DataContext = ExtractStopVm.stopViewModel; FModel_MI_Files_PAK.ItemsSource = MenuItems.pakFiles; FModel_MI_Files_Backups.ItemsSource = MenuItems.backupFiles; FModel_MI_Assets_GoTo.ItemsSource = MenuItems.customGoTos; FModel_AssetsPathTree.ItemsSource = SortedTreeviewVm.gameFilesPath.ChildrensView; Updater.CheckForUpdate(); DebugHelper.WriteUserSettings(); Folders.CheckWatermarks(); await Task.WhenAll( PaksGrabber.PopulateMenu(), AesGrabber.Load(Properties.Settings.Default.ReloadAesKeys), CdnDataGrabber.DoCDNStuff() ).ContinueWith(t => { Keys.NoKeyGoodBye(); MenuItems.FeedCustomGoTos(); AeConfiguration(); if (t.Exception != null) { Tasks.TaskCompleted(t.Exception); } else { StatusBarVm.statusBarViewModel.Set($"{Properties.Resources.Hello} {Environment.UserName} !", Properties.Resources.State); } App.StartTimer.Stop(); DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Startup Time]", $"{App.StartTimer.ElapsedMilliseconds}ms"); }, TaskScheduler.FromCurrentSynchronizationContext()); }