public void StopSlideShow(bool allowNotification) { Containers.ForEach(c => c.Animation.StopSlideAnimation()); if (allowNotification && TempProfile.SlidePlayMethod.Value == SlidePlayMethod.Interval && IntervalSlideTimer.IsEnabled) { MainWindow.Current.NotificationBlock.Show("スライドショー停止", NotificationPriority.Normal, NotificationTime.Short, NotificationType.None); } IntervalSlideTimer.Stop(); IntervalSlideTimerCount = 0; SlideShowState = SlideShowState.Stop; MainWindow.Current.UpdateToolbarViewing(); }
/* ---------------------------------------------------- */ // イベント /* ---------------------------------------------------- */ private void IntervalSlideTimer_Tick(object sender, EventArgs e) { IntervalSlideTimerCount += 1; if (TempProfile.SlidePlayMethod.Value == SlidePlayMethod.Interval) { if (IntervalSlideTimerCount >= TempProfile.SlideInterval.Value) { ActiveSlideToForward(TempProfile.SlideByOneImage.Value, TempProfile.SlideTimeInIntevalMethod.Value, true); int slideTime = (int)(TempProfile.SlideTimeInIntevalMethod.Value / 1000); // milisec → sec IntervalSlideTimerCount = 0 - slideTime; } } else { IntervalSlideTimer.Stop(); } }
public void StartIntervalSlideShow() { IntervalSlideTimer.Start(); IntervalSlideTimerCount = 0; SlideShowState = SlideShowState.Interval; }