Example #1
0
 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();
         }
     }
 }
Example #5
0
        static void Main(string[] args)
        {
            TV sonyTV = new SonyTVFactory().Create();

            TVCommand disCmd      = new DisplayCommand(sonyTV);
            TVCommand moveNextCmd = new MoveNextCommand(sonyTV);
            TVCommand movePreCmd  = new MovePreviousCommand(sonyTV);

            TV        philipsTv          = new PhilipsTVFactory().Create();
            TVCommand movePreCmd_philips = new MovePreviousCommand(philipsTv);

            RemoteController rc = new RemoteController(disCmd, moveNextCmd, movePreCmd_philips);

            rc.Display();
            rc.MoveNextChannel();
            rc.MovePreviousChannel();
        }
Example #6
0
 public void MovePrevious()
 {
     MovePreviousCommand.Execute(null);
 }
Example #7
0
 private void MovePrevious()
 {
     MoveToPage(PageIndex - 1);
     MovePreviousCommand.RaiseCanExecuteChanged();
 }