protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); if (IsResultCancel) { try { _cancellationSource.Cancel(); } catch (ObjectDisposedException) { } ServerEntry?.CancelBookingCommand.Execute(null); } }