internal static async Task ShowIfAppropriateAsync() { if (SystemInformation.IsFirstRun) { var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } }
public async Task ShowIfAppropriateAsync() { if (SystemInformation.Instance.IsFirstRun && !shown) { shown = true; var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } }
internal static async void ShowIfAppropriate() { if (SystemInformation.IsFirstRun && !shown) { shown = true; var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } }
internal static async Task ShowIfAppropriateAsync() { try { var x = App.localSettings.Values["firstRun"].Equals("notFirstRun"); } catch (Exception) { App.localSettings.Values["firstRun"] = "notFirstRun"; var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } }
internal static async Task ShowIfAppropriateAsync() { try { var x = App.localSettings.Values["newUser"].Equals("false"); } catch (Exception) { var dialog = new FirstRunDialog(); await dialog.ShowAsync(); App.localSettings.Values["newUser"] = "******"; } }
internal static async Task ShowIfAppropriateAsync() { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() => { if (SystemInformation.Instance.IsFirstRun && !_shown) { _shown = true; var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } }); }
internal static async Task ShowIfAppropriateAsync() { bool hasShownFirstRun = false; hasShownFirstRun = await Windows.Storage.ApplicationData.Current.LocalSettings.ReadAsync <bool>(nameof(hasShownFirstRun)); if (!hasShownFirstRun) { await Windows.Storage.ApplicationData.Current.LocalSettings.SaveAsync(nameof(hasShownFirstRun), true); var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } }
public async Task RunIfAppropriateAsync() { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync( CoreDispatcherPriority.Normal, async() => { if (SystemInformation.IsFirstRun && !shown) { shown = true; var dialog = new FirstRunDialog(); BookmarkDataService.AddBookmarks(); await dialog.ShowAsync(); } }); }
internal static async Task ShowIfAppropriateAsync() { var complete = new TaskCompletionSource <object>(); await App.Shell.Dispatcher.RunAsync( CoreDispatcherPriority.Normal, async() => { if (SystemInformation.IsFirstRun && !shown) { shown = true; var dialog = new FirstRunDialog(); await dialog.ShowAsync(); } complete.SetResult(null); }); await complete.Task; }
private void runSetup() { try { using (IUnitOfWork uow = UnitOfWorkFactory.CreateUnitOfWork()) { var setupWizardSetting = uow.SettingsRepository.GetSettingWithDefault(GinAppSettingKeys.SETUP_WIZARD_COMPLETE, ""); if (string.IsNullOrEmpty(setupWizardSetting)) { //wizard hasn't been completed so let's run it Logging.Logger.Log("INFO", "Launching setup form"); var setupForm = new FirstRunDialog(); focusApplication(); if (setupForm.ShowDialog() == DialogResult.OK) { Show(); this.WindowState = FormWindowState.Maximized; SetForegroundWindow(this.Handle); } else { Application.Exit(); } } else { Show(); this.WindowState = FormWindowState.Maximized; SetForegroundWindow(this.Handle); } } } catch (Exception exc) { Logging.Logger.Log(exc); MessageBox.Show("An error occured in setup wizard"); Application.Exit(); } }
public async Task ShowFirstRunDialog() { var dialog = new FirstRunDialog(); await ShowDialog(dialog); }
private async void Welcome_Click(object sender, RoutedEventArgs e) { var dialog = new FirstRunDialog(); await dialog.ShowAsync(); }