private void EditGameContentDialog_OnClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!_closeDialog) { args.Cancel = true; } }
private void OnLoginDialogClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!CanClose) { args.Cancel = true; } }
private async void AudioCaptureDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (_capture != null) { try { await _capture.StopRecordAsync(); } catch { }; try { _capture.Dispose(); } catch { }; _mediaTimelineController.Pause(); try { (_player.Source as MediaSource).Dispose(); } catch { }; _player.Dispose(); _timer.Stop(); if (!_proceed) { await(await ApplicationData.Current.TemporaryFolder.GetFileAsync(_tempFile)).DeleteAsync(); } } }
public void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!canClose) { args.Cancel = true; } }
private void OnClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { var item = this.Item; if (item != null && args.Result == ContentDialogResult.Primary) { var validationResult = item.Validator.ValidateAll(); if (validationResult != null && !validationResult.IsValid) { foreach (var error in validationResult.ErrorList) { string originalText = this.validationErrors.Text; if (!string.IsNullOrEmpty(originalText)) { this.validationErrors.Text += Environment.NewLine; } this.validationErrors.Text += error.ErrorText; } // Show the error and don't allow the dialog to close this.validationErrors.Visibility = Visibility.Visible; args.Cancel = true; } } }
protected void OnClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!this.ViewModel.CanClose) { args.Cancel = true; } }
private void MyContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (this.rpDownload != null) { args.Cancel = true; } }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { // If result is secondary, we want to close anyway if (args.Result == ContentDialogResult.Secondary) { doNotClose = false; } else { // Don't really like this here but... if (resultsListView.SelectedItem != null) { // only including model to cast StringWrapper wrapper = resultsListView.SelectedItem as StringWrapper; if (!string.IsNullOrEmpty(wrapper.StringContent)) { args.Cancel = false; } } } if (doNotClose) { args.Cancel = true; } }
private void KeyEntryDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!CanClose) { args.Cancel = true; } }
void SignInContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { // If sign in was successful, save or clear the user name based on the user choice. if (this.Result == SignInResult.SignInOK) { if (saveUserNameCheckBox.IsChecked == true) { SaveUserName(); } else { ClearUserName(); } } // If the user entered a name and checked or cleared the 'save user name' checkbox, then clicked the back arrow, // confirm if it was their intention to save or clear the user name without signing in. if (this.Result == SignInResult.Nothing && !string.IsNullOrEmpty(userNameTextBox.Text)) { if (saveUserNameCheckBox.IsChecked == false) { args.Cancel = true; FlyoutBase.SetAttachedFlyout(this, (FlyoutBase)this.Resources["DiscardNameFlyout"]); FlyoutBase.ShowAttachedFlyout(this); } else if (saveUserNameCheckBox.IsChecked == true && !string.IsNullOrEmpty(userNameTextBox.Text)) { args.Cancel = true; FlyoutBase.SetAttachedFlyout(this, (FlyoutBase)this.Resources["SaveNameFlyout"]); FlyoutBase.ShowAttachedFlyout(this); } } }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!isExit && aThreadWaiting) { args.Cancel = true; } }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!IsExit) { args.Cancel = true; } }
void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!viewModel.IsLoading) { //args.Cancel = true; } }
/// <summary> /// Prevents closing of the dialog which is the default action by a dialog when any of its stock buttons /// are clicked, we will handle closing manually by calling this.Hide(). /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void UpdateDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (ProgressRingUpdate.IsActive) { args.Cancel = true; } }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (args.Result == ContentDialogResult.Primary && !IsPrimaryButtonEnabled) { args.Cancel = true; } }
private void SingleVideoDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!needToClose) { args.Cancel = true; } }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (_blockClose) { args.Cancel = true; } }
private void DatasetImportDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!finishImport) { args.Cancel = true; } }
private void OnDialogClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { bool isChecked = true; if (username.Text == "") { msg.Text = "请输入用户名。"; isChecked = false; } if (pwd.Password == "" || pwd2.Password == "") { msg.Text = "请输入密码。"; isChecked = false; } if (pwd.Password != pwd2.Password) { msg.Text = "两次输入的密码不一致。"; isChecked = false; } if(args.Result == ContentDialogResult.Primary) { args.Cancel = !isChecked; } }
private async void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!CanClose) { args.Cancel = true; } }
private async void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { switch (args.Result) { case ContentDialogResult.None: case ContentDialogResult.Primary: if (this.pb_Loading.IsIndeterminate) { await logOnAsync(args); } else { if (args.Result == ContentDialogResult.None && Client.Current.NeedLogOn) { args.Cancel = true; } } break; case ContentDialogResult.Secondary: if (Client.Current.NeedLogOn) { Application.Current.Exit(); } break; } }
private void CreateCategoryDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!_canClose) { args.Cancel = true; } }
private void SampleDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (isEscape) { args.Cancel = true; } }
void SignInContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { // If sign in was successful, save or clear the user name based on the user choice. // If the user entered a name and checked or cleared the 'save user name' checkbox, then clicked the back arrow, // confirm if it was their intention to save or clear the user name without signing in. }
private void OnClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { _handler.UnloadVisibleItems(); _zoomer.Opening = null; _zoomer.Closing = null; _zoomer.DownloadFile = null; }
void SettingsDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { // If sign in was successful, save or clear the user name based on the user choice. if (this.Result == ContentDialogResult.Primary) { Windows.Storage.ApplicationData.Current.LocalSettings.Values["ipAddress"] = ipAddress.Text; } }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { // ignore Close events except Secondary button if (args.Result != ContentDialogResult.Secondary) { args.Cancel = true; } }
private void OnFilePickerClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { if ((FileListingGrid.Visibility == Visibility.Collapsed) && (args.Result == ContentDialogResult.None || _newFolderMode)) { args.Cancel = true; return; } }
private void ImmersiveView_OnClosing(ContentDialog sender, ContentDialogClosingEventArgs args) { var videoView = ContentControl.ContentTemplateRoot as AutoVideoControl; if (videoView == null) { return; } videoView.MediaPlayer.Pause(); }
private void Dialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { var dialog = sender as CroppImageContentDialog; if (dialog?.DialogResult == DialogResultEnum.Cancel) { args.Cancel = true; // Handle back press here instead of closing. } }
private void BluetoothFileTransfer_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { ObexClient.DataTransferFailed -= ObexClient_DataTransferFailed; ObexClient.DataTransferProgressed -= ObexClient_DataTransferProgressed; ObexClient.DataTransferSucceeded -= ObexClient_DataTransferSucceeded; ObexClient.ConnectionFailed -= ObexClient_ConnectionFailed; ObexClient.Aborted -= ObexClient_Aborted; ObexClient.Disconnected -= ObexClient_Disconnected; ObexClient.DeviceConnected -= ObexClient_DeviceConnected; }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (closing) { ViewModel.ConfirmSettingsCommand.Execute(null); } else { args.Cancel = true; } }
private void ProgressDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { args.Cancel = !Cancelable; }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!IsExit) args.Cancel = true; }
private void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { if (!isExit && aThreadWaiting) args.Cancel = true; }