private void Diaporama_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.F1: ShowHelp(); break; case Keys.F11: Toggle_FullScreen(); break; case Keys.P: SlideshowTimer.Start(); break; case Keys.S: SlideshowTimer.Stop(); break; case Keys.R: RandomOrder = !RandomOrder; SetPhotosOrder(); break; case Keys.Down: SlideshowTimer.Interval = (SlideshowTimer.Interval < 60000 ? SlideshowTimer.Interval + 250 : SlideshowTimer.Interval); break; case Keys.Up: SlideshowTimer.Interval = (SlideshowTimer.Interval > 500 ? SlideshowTimer.Interval - 250 : SlideshowTimer.Interval); break; case Keys.Escape: SlideshowTimer.Stop(); Close(); break; } }
private void Diaporama_Shown(object sender, EventArgs e) { WaitSplash.Show(this, "Loading slide show photos..."); Slides = new List <Photo>(); // PhotoPool = new List<Photo>(); foreach (int photoId in SlideShowList) { // Obtenir la photo du service Photo photo = DBPhotosWebServices.GetPhoto(photoId); if (photo != null) { if (bl.IndexOf(photo.OwnerId) == -1) { Slides.Add(photo); } } } WaitSplash.Hide(); // Définir l'ordre des photos SetPhotosOrder(); // Démarrer l'horloge SlideshowTimer.Start(); }