private void RaisePlayerStatusChanged() { MoveNextCommand.RaiseCanExecuteChanged(); MovePreviousCommand.RaiseCanExecuteChanged(); PauseCommand.RaiseCanExecuteChanged(); ResumeCommand.RaiseCanExecuteChanged(); SkipToPercentageCommand.RaiseCanExecuteChanged(); RaisePropertyChanged(nameof(Playing)); }
void MoveToPreviousPage() { if (this.CanMoveToPreviousPage) { PagesActu--; this.CurrentPage = this.Pages[this.CurrentPageIndex - 1]; MovePreviousCommand.RaiseCanExecuteChanged(); MoveNextCommand.RaiseCanExecuteChanged(); } }
void OnRequestClose() { try { this.CurrentPage = this.Pages[0]; PagesActu = 1; MovePreviousCommand.RaiseCanExecuteChanged(); } catch (Exception ex) { MessageBox.Show("Erreur : " + ex.Message, "Erreur !", MessageBoxButton.OK, MessageBoxImage.Error); } }
void MoveToNextPage() { if (this.CanMoveToNextPage) { if (this.CurrentPageIndex < this.Pages.Count - 1) { this.CurrentPage = this.Pages[this.CurrentPageIndex + 1]; PagesActu++; MovePreviousCommand.RaiseCanExecuteChanged(); MoveNextCommand.RaiseCanExecuteChanged(); } else { this.OnRequestClose(); } } }
private void MovePrevious() { MoveToPage(PageIndex - 1); MovePreviousCommand.RaiseCanExecuteChanged(); }