Exemple #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);
        }
Exemple #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);
     }
 }
Exemple #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);
     }
 }
Exemple #4
0
 private void ReloadSettings(object sender, System.EventArgs e)
 {
     _imageFiles     = GetImagesFromDirectory();
     _imageFilesPath = _imageFiles.GetEnumerator();
     NextImage();
 }