コード例 #1
0
        public SildeShowImageProvider(Setting setting)
        {
            _setting = setting;

            _imageFiles     = GetImagesFromDirectory();
            _imageFilesPath = _imageFiles.GetEnumerator();
            ChangeImage(null);

            _timer = new Timer(new TimerCallback(ChangeImage));
            _timer.Change((int)_setting.UpdateImageInterval.TotalMilliseconds, (int)_setting.UpdateImageInterval.TotalMilliseconds);
        }
コード例 #2
0
 private void ReloadSettings(object sender, System.EventArgs e)
 {
     if (_setting.ImageBackgroundType == ImageBackgroundType.Single ||
         _setting.ImageBackgroundType == ImageBackgroundType.SingleEach)
     {
         _timer.Change(Timeout.Infinite, Timeout.Infinite);
     }
     else
     {
         _imageFiles     = GetImagesFromDirectory();
         _imageFilesPath = _imageFiles.GetEnumerator();
         _timer.Change(0, (int)_setting.UpdateImageInterval.TotalMilliseconds);
     }
 }
コード例 #3
0
 public void ReloadSettings()
 {
     if (_setting.ImageBackgroundType == ImageBackgroundType.Single)
     {
         _timer.Change(Timeout.Infinite, Timeout.Infinite);
     }
     else
     {
         _imageFiles     = GetImagesFromDirectory();
         _imageFilesPath = _imageFiles.GetEnumerator();
         ChangeImage(null);
         _timer.Change(0, (int)_setting.UpdateImageInterval.TotalMilliseconds);
     }
 }
コード例 #4
0
 private void ReloadSettings(object sender, System.EventArgs e)
 {
     _imageFiles     = GetImagesFromDirectory();
     _imageFilesPath = _imageFiles.GetEnumerator();
     NextImage();
 }