private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (Window.Current.Content is RootPage root) { root.PopupClosed(); } }
private static void ActiveDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (!DialogAwaiter.Task.IsCompleted) { DialogAwaiter.TrySetResult(true); } }
void DevicePickerDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (SelectedDevice == null) { _owner.OnDevicePickerDismissed(); } }
private async void ShowZoneCustomizedDialog(ContentDialog sender, ContentDialogClosedEventArgs args) { addDeviceDialog.Closed -= ShowZoneCustomizedDialog; ZoneCustomizedDialog zoneCustomizedDialog = new ZoneCustomizedDialog(MyDevice); var result = await zoneCustomizedDialog.ShowAsync(); }
private async void C_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (args.Result == ContentDialogResult.Secondary) { //BooksGridView.ItemsSource = await APIServices.GetBooksAsync(); } }
private async static void FeedbackDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (args.Result == ContentDialogResult.Primary) { await Launcher.LaunchUriAsync(new Uri("mailto:[email protected]?subject=Year%20Progress%20Feedback&body=<Write%20your%20feedback%20here>")); } }
void DevicePickerDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (SelectedDevice == null) { _owner.OnDevicePickerDismissed(); } }
/// <summary> /// Recover navigation view selected item after settings dialog closed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SettingsDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs e) { if (lastSelectedItem != null) { NavigationViewControl.SelectedItem = lastSelectedItem; } }
private void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { var procedureResult = (sender as BleDeviceSelectorDialog).Result; GyroscopeRfcommServiceConnection = new GyroscopeRfcommServiceConnectionWrapper(procedureResult[GyroscopeRfcommServiceConnectionWrapper.RfcommServiceId].RfcommConnection); GyroscopeRfcommServiceConnection.OnReadingUpdated += GyroscopeRfcommServiceConnection_OnReadingUpdated; }
private void OnLoginDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (Result == null) { Result = LoginDialogResult.Cancel; } }
void dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { KnjigaDetaljiViewModel model2 = (KnjigaDetaljiViewModel)defaultViewModel["detalji"]; HttpResponseMessage response = knjigaDetaljiService.GetResponse(model2.KnjigaID + "/" + Global.prijavljeniKorisnik.Id); if (response.IsSuccessStatusCode) { KnjigaDetaljiViewModel model = response.Content.ReadAsAsync <KnjigaDetaljiViewModel>().Result; defaultViewModel["detalji"] = model; if (model.IsInPolica) { dodajBtn.Visibility = Visibility.Collapsed; ukloniBtn.Visibility = Visibility.Visible; } else { dodajBtn.Visibility = Visibility.Visible; ukloniBtn.Visibility = Visibility.Collapsed; } HttpResponseMessage r = reklamaService.GetResponse(); if (r.IsSuccessStatusCode) { Reklama reklama = r.Content.ReadAsAsync <Reklama>().Result; reklamaS.Source = new BitmapImage(new Uri(reklama.URL, UriKind.Absolute)); } } }
private void OnDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { this.LoginWebView.LoadCompleted -= OnWebViewLoadCompleted; this.LoginWebView.NavigationStarting -= OnWebViewNavigationStarting; this.ViewModel.Dispose(); this.DataContext = null; }
private static void Dlg_Closed( ContentDialog sender, ContentDialogClosedEventArgs args ) { sender.Closed -= Dlg_Closed; if( sender is IDisposable ) { ( sender as IDisposable ).Dispose(); } }
private async void OnDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { sender.Closed -= OnDialogClosed; isDialogOpened = false; if (dialogQueue != null && dialogQueue.Count > 0) { await DisplayContentDialog(dialogQueue.Dequeue()); } }
private void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { Window.Current.CoreWindow.SizeChanged -= this.CoreWindow_SizeChanged; foreach (var overlay in this.overlays) { overlay.Visibility = Visibility.Collapsed; } }
private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { currentViewItem = null; Title = "Create New"; configLabel.Content = "Config Name: "; authorNameTxt.Text = ""; websiteNameTxt.Text = ""; configNameTxt.Text = ""; successKeysTxt.Text = ""; }
private void PropertiesDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChanged; sender.Closed -= PropertiesDialog_Closed; if (tokenSource != null && !tokenSource.IsCancellationRequested) { tokenSource.Cancel(); tokenSource = null; } propertiesDialog.Hide(); }
private static async void DialogOnClosedAsync(ContentDialog sender, ContentDialogClosedEventArgs args) { if (_dialogQueue.Count == 0) { _dialogLock = false; return; } var next = _dialogQueue.Dequeue(); await next.ShowAsync(); }
private void ContentDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (args.Result == ContentDialogResult.Primary) { ViewModel.AcceptCommand.Execute(null); } else { ViewModel.CancelCommand.Execute(null); } }
private void ContentDialogOnClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { sender.Closed -= ContentDialogOnClosed; var signInDialog = sender.Content as SignInDialog; if (signInDialog != null) { signInDialog.Cancel(); // be sure the SignInDialog is deactivated when pressing back button sender.Content = null; } }
private static void ActiveDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { try { _dialogAwaiter.SetResult(true); } catch (Exception) { // Ignore } }
//Since process is async if a user signs in and then exits the dialog, a post may still be created //So this is just a warning explaining that private async void ContentDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (shareCancelled) { var dialog = new WarningDialog(); dialog.Title = "Share"; dialog.Text = "Share Cancelled. If you signed into your social media account, a post may have still been created"; dialog.PrimaryButtonText = ""; await dialog.ShowAsync(); } }
private void PropertiesDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChanged; sender.Closed -= PropertiesDialog_Closed; this.FindDescendants().Where(x => x is SettingsBlockControl).Cast <SettingsBlockControl>().Select(x => (x.ExpandableContent as Frame).Content as PropertiesTab).Where(x => x != null).ForEach(tab => tab.Dispose()); if (tokenSource != null && !tokenSource.IsCancellationRequested) { tokenSource.Cancel(); tokenSource = null; } propertiesDialog.Hide(); }
private static async void ReviewDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (args.Result == ContentDialogResult.Primary) { RemovePromptsForever(); await Launcher.LaunchUriAsync(new Uri("ms-windows-store://review/?ProductId=9PDQ5MLJFVSX")); } else { await ShowFeedbackDialog(); } }
private void BleDeviceSelectorDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { BluetoothManager.LEScanner.Added -= LEScanner_Added; BluetoothManager.LEScanner.Removed -= LEScanner_Removed; BluetoothManager.LEScanner.EnumerationCompleted -= LEScanner_EnumerationCompleted; BluetoothManager.LEScanner.Stopped -= LEScanner_Stopped; if (BluetoothManager.LEScanner.Status == BluetoothLEScannerState.Started || BluetoothManager.LEScanner.Status == BluetoothLEScannerState.EnumerationCompleted) { BluetoothManager.LEScanner.Stop(); } }
/// <summary> /// Whenever the dialog as close continu with operation /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private async void BackupDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (args.Result == ContentDialogResult.Primary) { //Make a field book bakcup await BackupFieldBook(); DeleteFieldBook(); } else { DeleteFieldBook(); } }
private void ContentDialogNotification_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { this.isopen = false; this.Title = null; this.Content = null; this.PrimaryButtonText = ""; this.PrimaryButtonCommand = null; this.PrimaryButtonCommandParameter = null; this.SecondaryButtonText = ""; this.SecondaryButtonCommand = null; this.SecondaryButtonCommandParameter = null; this.CloseButtonText = ""; this.DefaultButton = ContentDialogButton.None; }
void dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { #region lame HttpResponseMessage response = hubService.GetResponse(Global.prijavljeniKorisnik.Id.ToString()); HubPageViewModel model = new HubPageViewModel(); if (response.IsSuccessStatusCode) { model = new HubPageViewModel(response.Content.ReadAsAsync <HubPageViewModel>().Result); defaultViewModel["BookShelves"] = model.BookShelves; } #endregion }
async void EditBulbDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { LifxLabelMessage llm = await StorageHelper.SelectedBulbs[0].SetLabelCommand(((sender.Content as StackPanel).Children[1] as TextBox).Text); StorageHelper.SelectedBulbs[0].Label = llm.BulbLabel; StorageHelper.SaveToStorage(); await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (StorageHelper.SelectedType == SelectionType.IndividualBulb) { MainPivot.Title = APP_HEADING_TEXT + llm.BulbLabel; } }); }
// Event handler for when ContentDialog is closed. private static async void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs e) { // Remove the ContentDialog that has just closed from the queue. App.DialogueQueue.RemoveAll(x => x.ContentDialog == sender); // Check if there's more ContentDialogs in queue. if (App.DialogueQueue.Count > 0) { var callback = App.DialogueQueue[0].Callback; var result = await App.DialogueQueue[0].ContentDialog.ShowAsync(); // Check if there's any callbacks, and execute if so. callback?.DynamicInvoke(result); } }
/// <summary> /// Handles the dialog closed event /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void ErrorDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { //If the user´s search for mail returned null if (!MailHandler.isMailSearchSuccess && sender.Title.Equals("Mail error")) { errorDialog.Closed -= ErrorDialog_Closed; errorDialog = null; return; } //If no mail exists on server, navigate to SettingsPage so that the user can check settings if (sender.Title.Equals("Mail error")) { errorDialog.Closed -= ErrorDialog_Closed; errorDialog = null; Frame.Navigate(typeof(SettingsPage)); } }
private void ContentDialogOnClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { sender.Closed -= ContentDialogOnClosed; var signInDialog = sender.Content as SignInDialog; if (signInDialog != null) { signInDialog.Cancel(); // be sure the SignInDialog is deactivated when pressing back button sender.Content = null; } }
private async void TagsDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { await MainViewModel.Current.SaveTagsAsync(); await ReloadQuestions(); }
private void ContentDialog_Closed (ContentDialog sender, ContentDialogClosedEventArgs args) { cancellationTokenSource.Cancel(); }
private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { this.ViewModel.ContactInvited -= OnContactInvited; this.ViewModel.Canceled -= OnCanceled; this.ViewModel.EmailError -= OnEmailError; }
private void AccordDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args) { if (clickedButton != null) { clickedButton.Focus(FocusState.Pointer); } }