private void Cancel_Tapped(object sender, TappedRoutedEventArgs e) { FlyoutCloseRequest?.Invoke(this, new SignInToCloudServiceFlyoutResultEventArgs { ShouldStartSignInProcess = false, }); }
public void InitFlyout() { bool changelogPresent = false; var ids = WhatsNewHelper.GetWhatsNewContentIdAndMarkAsRead(); foreach (var item in Content.Children) { var sp = item as StackPanel; if (sp == null) { continue; } if (ids.Contains(sp.Tag.ToString())) { changelogPresent = true; sp.Visibility = Visibility.Visible; } else { sp.Visibility = Visibility.Collapsed; } } if (!changelogPresent) { FlyoutCloseRequest?.Invoke(this, new EventArgs()); } #if !DEBUG //App.Tracker.Send(HitBuilder.CreateCustomEvent("What's new", "Show", DeviceInfo.ApplicationVersionString).Build()); #endif }
private async void Authenticate_Tapped(object sender, TappedRoutedEventArgs e) { try { this.IsEnabled = false; progressRing.Visibility = Visibility.Visible; var graph = new Graph(await MSAAuthenticator.GetAccessTokenAsync("User.Read")); //await (new MessageDialog(await graph.GetUserUniqueIdAsync())).ShowAsync(); var userId = await graph.GetUserUniqueIdAsync(); SecureKeyStorage.SetUserId(userId); } catch (Exception ex) { Debug.WriteLine($"Authenticate failed. {ex.ToString()}"); MainPage.Current.IsAskedAboutMSAPermission = false; MainPage.Current.isAskedAboutMSAPermissionThisTime = true; } finally { this.IsEnabled = true; FlyoutCloseRequest?.Invoke(this, new EventArgs()); } }
private async void EnableUniversalClipboard_Tapped(object sender, TappedRoutedEventArgs e) { ((Button)sender).IsEnabled = false; Windows.Storage.ApplicationData.Current.LocalSettings.Values["SendCloudClipboard"] = true; await PCExtensionHelper.StartPCExtension(); FlyoutCloseRequest?.Invoke(this, new EventArgs()); }
private async void Upgrade_Tapped(object sender, TappedRoutedEventArgs e) { UpgradeButton.IsEnabled = false; CancelButton.IsEnabled = false; progressRing.Visibility = Visibility.Visible; progressRing.IsActive = true; await TrialHelper.TryUpgrade(); TrialHelper.UpgradeFlyoutCompletion.SetResult(true); FlyoutCloseRequest?.Invoke(this, new EventArgs()); }
private async void Donate_Tapped(object sender, TappedRoutedEventArgs e) { EnableProgressRing(); if (donatePricesList.SelectedItem is PurchaseItem item) { var result = await StoreHelper.TryPurchaseConsumable(item); if (result == Windows.Services.Store.StorePurchaseStatus.Succeeded) { MessageDialog md = new MessageDialog("Thank you for your support!"); await md.ShowAsync(); } else { MessageDialog md = new MessageDialog(result.ToString(), "Purchase failed."); await md.ShowAsync(); } } FlyoutCloseRequest?.Invoke(this, new EventArgs()); }
public void InitFlyout() { bool changelogPresent = false; var ids = WhatsNewHelper.GetWhatsNewContentId(); foreach (var item in Content.Children) { var sp = item as StackPanel; if (sp == null) { continue; } if (ids.Contains(sp.Tag.ToString())) { changelogPresent = true; sp.Visibility = Visibility.Visible; } else { sp.Visibility = Visibility.Collapsed; } } if (!changelogPresent) { FlyoutCloseRequest?.Invoke(this, new EventArgs()); } if (ids.Count == 1) { bool specialHeaderPresent = (from x in Header.Children let fe = x as FrameworkElement where ((fe != null) && (fe.Tag != null) && (fe.Tag.ToString() == ids[0])) select x).Count() > 0; foreach (var item in Header.Children) { var fe = item as FrameworkElement; if (fe == null) { continue; } if (specialHeaderPresent) { if ((fe.Tag == null) || (fe.Tag.ToString() != ids[0])) { fe.Visibility = Visibility.Collapsed; } else { fe.Visibility = Visibility.Visible; } } else { if (!string.IsNullOrEmpty(fe.Tag as string)) { fe.Visibility = Visibility.Collapsed; } } } bool specialFooterPresent = (from x in Footer.Children let fe = x as FrameworkElement where ((fe != null) && (fe.Tag != null) && (fe.Tag.ToString() == ids[0])) select x).Count() > 0; foreach (var item in Footer.Children) { var fe = item as FrameworkElement; if (fe == null) { continue; } if (specialFooterPresent) { if ((fe.Tag == null) || (fe.Tag.ToString() != ids[0])) { fe.Visibility = Visibility.Collapsed; } else { fe.Visibility = Visibility.Visible; } } else { if (!string.IsNullOrEmpty(fe.Tag as string)) { fe.Visibility = Visibility.Collapsed; } } } } #if !DEBUG App.Tracker.Send(HitBuilder.CreateCustomEvent("What's new", "Show", DeviceInfo.ApplicationVersionString).Build()); #endif }
private void OKButton_Tapped(object sender, TappedRoutedEventArgs e) { FlyoutCloseRequest?.Invoke(this, new EventArgs()); }
private void NavigationView_BackRequested(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewBackRequestedEventArgs args) { FlyoutCloseRequest?.Invoke(this, new EventArgs()); }
private void Cancel_Tapped(object sender, TappedRoutedEventArgs e) { TrialHelper.UpgradeFlyoutCompletion.SetResult(false); FlyoutCloseRequest?.Invoke(this, new EventArgs()); }