private void OnBackKeyPressed(object sender, System.ComponentModel.CancelEventArgs e) { if (ProgressBarOverlay.IsOpen() && longRunningOperation != null) { longRunningOperation.Dispose(); longRunningOperation = null; e.Cancel = true; } else { switch (PageType) { case LibraryModel.LibraryLevel.Catalogue: //list of cataloue's, means that we are in library App.Engine.StatisticsManager.LogLibraryBack(ContentId); break; case LibraryModel.LibraryLevel.Category: // list of category means that we are in catalogue App.Engine.StatisticsManager.LogCatalogueBack(ContentId); break; case LibraryModel.LibraryLevel.MediaItemsList: // list of media items, means that we are in category App.Engine.StatisticsManager.LogCategoryBack(ContentId); break; } } base.OnBackKeyPress(e); }
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs args) { if (ProgressBarOverlay.IsOpen()) { args.Cancel = true; } base.OnBackKeyPress(args); }
private void OnBackKeyPressed(object sender, System.ComponentModel.CancelEventArgs e) { if (ProgressBarOverlay.IsOpen() && longRunningOperation != null) { longRunningOperation.Dispose(); longRunningOperation = null; e.Cancel = true; } base.OnBackKeyPress(e); }
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs args) { if (ProgressBarOverlay.IsOpen() && longRunningOperation != null) { longRunningOperation.Dispose(); longRunningOperation = null; args.Cancel = true; } else { if (!_closeQuestionMsgBoxLock && !backToContentLists) { _closeQuestionMsgBoxLock = true; if (MessageBox.Show(FileLanguage.MainPage_ClosingApplicationMessage, FileLanguage.ARE_YOU_SURE, MessageBoxButton.OKCancel) == MessageBoxResult.Cancel) { args.Cancel = true; } _closeQuestionMsgBoxLock = false; } } backToContentLists = false; base.OnBackKeyPress(args); }