public async void ShowTutorialDialogOrNot() { TutorialDialog td = new TutorialDialog(); await td.ShowAsync(); }
private async void WindowsPage_Loaded(object sender, RoutedEventArgs e) { #region App Title Bar // Hide default title bar. var coreTitleBar = CoreApplication.GetCurrentView().TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; UpdateTitleBarLayout(coreTitleBar); // Set XAML element as a draggable region. Window.Current.SetTitleBar(AppTitleBar); // Register a handler for when the size of the overlaid caption control changes. // For example, when the app moves to a screen with a different DPI. coreTitleBar.LayoutMetricsChanged += CoreTitleBar_LayoutMetricsChanged; // Register a handler for when the title bar visibility changes. // For example, when the title bar is invoked in full screen mode. coreTitleBar.IsVisibleChanged += CoreTitleBar_IsVisibleChanged; #endregion Log.Debug("[WindowsPage_Loaded] Intialize ..."); LoadingRing.IsActive = true; LoadingFrame.Visibility = Visibility.Visible; WindowsGrid.Visibility = Visibility.Visible; WindowsGrid1.Visibility = Visibility.Collapsed; WindowsFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo()); WindowsFrame1.Navigate(typeof(SettingsPage), false, new SuppressNavigationTransitionInfo()); LoadEULASettings(); LoadTutorialDone(); await Task.Delay(3000); LoadingFrame.Visibility = Visibility.Collapsed; LoadingRing.IsActive = false; WindowsGrid.Visibility = Visibility.Collapsed; WindowsGrid1.Visibility = Visibility.Collapsed; #region Show EULA page await(new ServiceViewModel()).Sendupdatestatus("ASUSSYS"); if (ServiceViewModel.returnnum == 1)//ASUS SYS { WindowsGrid.Visibility = Visibility.Visible; WindowsGrid1.Visibility = Visibility.Collapsed; if (!TutorialDoneOrNot) { TutorialDialog td = new TutorialDialog(); await td.ShowAsync(); } } else//Other SYS show EULA page { WindowsGrid.Visibility = Visibility.Visible; WindowsGrid1.Visibility = Visibility.Collapsed; if (!EulaAgreeOrNot) { EULADialog ed = new EULADialog(); await ed.ShowAsync(); } else if (!TutorialDoneOrNot) { TutorialDialog td = new TutorialDialog(); await td.ShowAsync(); } } #endregion }