diff --git a/ClaudiaIDE/source.extension.vsixmanifest b/ClaudiaIDE/source.extension.vsixmanifest index b67b401..8871461 100644 --- a/ClaudiaIDE/source.extension.vsixmanifest +++ b/ClaudiaIDE/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + ClaudiaIDE This extension change the background image of editor. https://github.com/buchizo/ClaudiaIDE diff --git a/ClaudiaIDE16/source.extension.vsixmanifest b/ClaudiaIDE16/source.extension.vsixmanifest index 2a9e338..5dd66d7 100644 --- a/ClaudiaIDE16/source.extension.vsixmanifest +++ b/ClaudiaIDE16/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + ClaudiaIDE 2019 This extension change the background image of editor. https://github.com/buchizo/ClaudiaIDE diff --git a/Shared/ClaudiaIdePackage.cs b/Shared/ClaudiaIdePackage.cs index 8b284d0..e38437b 100644 --- a/Shared/ClaudiaIdePackage.cs +++ b/Shared/ClaudiaIdePackage.cs @@ -19,7 +19,7 @@ namespace ClaudiaIDE { [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] - [InstalledProductRegistration("#110", "#112", "3.1.1", IconResourceID = 400)] + [InstalledProductRegistration("#110", "#112", "3.1.2", IconResourceID = 400)] [ProvideOptionPage(typeof(ClaudiaIdeOptionPageGrid), "ClaudiaIDE", "General", 110, 116, true)] [Guid(GuidList.PackageId)] [ProvideAutoLoad("{ADFC4E65-0397-11D1-9F4E-00A0C911004F}", diff --git a/Shared/ImageProviders/SingleImageEachProvider.cs b/Shared/ImageProviders/SingleImageEachProvider.cs index 7b90a0a..8e23c8d 100644 --- a/Shared/ImageProviders/SingleImageEachProvider.cs +++ b/Shared/ImageProviders/SingleImageEachProvider.cs @@ -29,6 +29,12 @@ private ImageFiles GetImagesFromDirectory() public override BitmapSource GetBitmap() { + if (_imageFiles == null) + { + _imageFiles = GetImagesFromDirectory(); + _imageFilesPath = _imageFiles.GetEnumerator(); + _imageFilesPath.MoveNext(); + } var current = _imageFilesPath?.Current; if (string.IsNullOrEmpty(current)) return null; @@ -68,6 +74,11 @@ protected override void OnSettingChanged(object sender, EventArgs e) public void NextImage() { + if (_imageFiles == null) + { + _imageFiles = GetImagesFromDirectory(); + _imageFilesPath = _imageFiles.GetEnumerator(); + } if (!_imageFilesPath.MoveNext()) if (Setting.LoopSlideshow) {