private void LoadTheme_PostExecute(LoadThemeResults result) { if (result.Loaded) { ViewModel = new ThemeViewModel(result.Theme); ThemePath = result.Path; if (ReloadBGMCommand.CanExecute(null)) ReloadBGMCommand.Execute(null); } IsBusy = false; }
private void LoadTheme_PostExecute(LoadThemeResults result) { if (result.Loaded) { ViewModel = new ThemeViewModel(result.Theme, result.Info); var path = result.Path; UpdateRecentsList(path); if (result.Info == null) { IconExtension icex = new IconExtension(@"/ThemeEditor.WPF;component/Resources/Icons/app_icn.ico", 48); var large = ((BitmapSource) icex.ProvideValue(null)).CreateResizedImage(48, 48); icex.Size = 24; var small = ((BitmapSource) icex.ProvideValue(null)).CreateResizedImage(24, 24); ViewModel.Info.LargeIcon.Bitmap = large; ViewModel.Info.SmallIcon.Bitmap = small; } ThemePath = result.Path; if (ReloadBGMCommand.CanExecute(null)) ReloadBGMCommand.Execute(null); } IsBusy = false; }