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