From 54ebd03ab993a30cf07f5166686bbed776991a6e Mon Sep 17 00:00:00 2001 From: tombogle Date: Wed, 8 May 2024 16:41:33 -0400 Subject: [PATCH] +semver:minor Added static SilResources class with property SilLogo101x113. --- CHANGELOG.md | 4 ++++ SIL.Windows.Forms/ImageToolbox/PalasoImage.cs | 7 ++----- SIL.Windows.Forms/Widgets/SilResources.cs | 12 ++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 SIL.Windows.Forms/Widgets/SilResources.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index e681024e7..20210e3fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Added + +- [SIL.Windows.Forms] Added static SilResources class with property SilLogo101x113. + ### Fixed - [SIL.Windows.Forms] Fixed backwards logic for LocalizationIncompleteViewModel.ShouldShowDialog (Technically this is a breaking contractual change, since effectively the behavior is the opposite of the original implementation, but the name so clearly indicates the desired behavior that it seems unlikely any subclass implementation would have implemented the logic according to the previously expected backwards behavior.) diff --git a/SIL.Windows.Forms/ImageToolbox/PalasoImage.cs b/SIL.Windows.Forms/ImageToolbox/PalasoImage.cs index e726025ec..fdc7e3dae 100644 --- a/SIL.Windows.Forms/ImageToolbox/PalasoImage.cs +++ b/SIL.Windows.Forms/ImageToolbox/PalasoImage.cs @@ -48,11 +48,11 @@ public Metadata Metadata /// the nature of the palaso image system is to deliver images, not file paths, to documents /// (we don't believe in "linking" to files somewhere on the disk which is just asking for problems /// as the document is shared). - /// But in one circumumstance, we do care: when the user chooses from disk (as opposed to from camera or scanner) + /// But in one circumstance, we do care: when the user chooses from disk (as opposed to from camera or scanner) /// and enters metadata, we want to store that metadata in the original. /// However, there is one circumstance (currently) in which this is not the original path: /// If we attempt to save metadata and can't (e.g. file is readonly), we create a temp file and - /// store the metadata there, then serve the temp file to the requestor. That's why we store this path. + /// store the metadata there, then serve the temp file to the requester. That's why we store this path. /// private string _pathForSavingMetadataChanges; @@ -70,8 +70,6 @@ public PalasoImage(Image image) Metadata = new Metadata(); } - - public static PalasoImage FromImage(Image image) { Guard.AgainstNull(image, "image"); @@ -81,7 +79,6 @@ public static PalasoImage FromImage(Image image) }; } - private Image _image; public Image Image diff --git a/SIL.Windows.Forms/Widgets/SilResources.cs b/SIL.Windows.Forms/Widgets/SilResources.cs new file mode 100644 index 000000000..b7184678f --- /dev/null +++ b/SIL.Windows.Forms/Widgets/SilResources.cs @@ -0,0 +1,12 @@ +using System.Drawing; +using JetBrains.Annotations; +using SIL.Windows.Forms.Properties; + +namespace SIL.Windows.Forms.Widgets +{ + public static class SilResources + { + [PublicAPI] + public static Bitmap SilLogo101x113 => Resources.SILLogoBlue101x113; + } +}