private void InitializePages() { WelcomePV = new WelcomePageView(); FirstSWV = new FirstSetupWizardView(); RecentPV = new RecentProjectView(); ProjectWV = new ProjectWizardView(); WikitPV = new WikiPageView(); AboutPV = new AboutPageView(); SettingsPV = new SettingsPageView(); WebsitePV = new WebsitePageView(); UserPV = new UserPageView(); GithubPV = new GithubPageView(); IntegratedTPV = new IntegratedToolsPageView(); }
// Show the first time setup to the user. public static void ShowFirstTimeSetup(ISettingsManager settings, INotificationService growl) { var messages = settings.IsHealthy(); if (!messages.Any()) { return; } foreach (var message in messages) { //growl.Error(message); } try { // Try to show First time setup. Task.Run(() => Application.Current.Dispatcher.Invoke(() => { var rpv = new FirstSetupWizardView(); var zxc = new UserControlHostWindowViewModel(rpv, 400, 600); var uchwv = new UserControlHostWindowView(zxc); rpv.ViewModelChanged += (_s, _e) => { if (rpv.ViewModel == null) { return; } rpv.ViewModel.ClosedAsync += async(s, e) => await Task.Run(() => Application.Current.Dispatcher.Invoke(() => uchwv.Close())); }; uchwv.Show(); })); } catch (Exception e) { // Log error. StaticReferences.Logger.Error(e.Message); } }
public static void ShowFirstTimeSetup() { if (Functionality.Services.SettingsManager.FirstTimeSetupForUser) { Task.Run(() => //await Task.Delay(5000); Application.Current.Dispatcher.Invoke(() => { var rpv = new FirstSetupWizardView(); var zxc = new UserControlHostWindowViewModel(rpv); var uchwv = new UserControlHostWindowView(zxc); rpv.ViewModelChanged += (_s, _e) => { if (rpv.ViewModel == null) { return; } rpv.ViewModel.ClosedAsync += async(s, e) => await Task.Run(() => Application.Current.Dispatcher.Invoke(() => uchwv.Close())); }; uchwv.Show(); })); } }