Beispiel #1
0
        /// <summary>
        /// Lorsque l'on relache une touche
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ScreenSaverWindow_KeyUp(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Space:
                _imageTimer.Enabled = !_imageTimer.Enabled;
                break;

            case Key.Left:
                _imageTimer.Stop();
                _screenSaverManager.GoToPreviousImage();
                _imageTimer.Start();
                break;

            case Key.Right:
                _imageTimer.Stop();
                _screenSaverManager.GoToNextImage();
                _imageTimer.Start();
                break;

            case Key.Up:
                _imageTimer.Stop();
                TemporarilyIncreaseTimer();
                DisplayTimerDuration(_screenSaverManager.Configuration.TimerDisplayDuration);
                _imageTimer.Start();
                break;

            case Key.Down:
                _imageTimer.Stop();
                TemporarilyDecreaseTimer();
                DisplayTimerDuration(_screenSaverManager.Configuration.TimerDisplayDuration);
                _imageTimer.Start();
                break;

            default:
                _screenSaverManager.DisplayInformationsWindow();
                break;
            }
        }
Beispiel #2
0
 /// <summary>
 /// Au clic sur le bouton "Précédente"
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Precedent_Click(object sender, RoutedEventArgs e)
 {
     _screenSaverManager.GoToPreviousImage();
 }