private void CancelAction(AsyncAction action) { Program.AssertOnEventThread(); OnPageUpdated(); action.Changed -= singleAction_Changed; action.Completed -= singleAction_Completed; action.Cancel(); }
public override void PageCancelled(ref bool cancel) { DeregisterEventHandlers(); _worker.CancelAsync(); if (resolvePrechecksAction != null && !resolvePrechecksAction.IsCompleted) { resolvePrechecksAction.Cancel(); } }
public override void Cancel() { if (inProgressAction != null) { inProgressAction.Cancel(); } base.Cancel(); }
public void SilentClose() { if (AsyncAction != null) { AsyncAction.Cancel(); } Window.Current.CoreWindow.SizeChanged -= CoreWindow_SizeChanged; if (Popup != null) { Popup.IsOpen = false; Popup = null; } }
private void buttonCancel_Click(object sender, EventArgs e) { buttonCancel.Enabled = false; if (CancelClicked != null) { CancelClicked(sender, e); } if (action != null) { action.Cancel(); } }
public bool Close(bool force = false) { if (!force) { var eventArgs = new CancelEventArgs(); OnPopup_Closing(eventArgs); if (eventArgs.Cancel) { return(false); } } if (AsyncAction != null) { AsyncAction.Cancel(); } Window.Current.CoreWindow.SizeChanged -= CoreWindow_SizeChanged; if (Popup != null) { DocumentViewModelHelper.OnDestroy(ViewHelper.GetViewModelFromView(Content)); Popup.IsOpen = false; Popup = null; } return(true); }