Skip to content

Commit

Permalink
Merge pull request #1319 from sillsdev/added-sil-resources-to-provide…
Browse files Browse the repository at this point in the history
…-logo

Added static SilResources class with property SilLogo101x113.
  • Loading branch information
tombogle authored May 9, 2024
2 parents e604711 + 54ebd03 commit d85d3dd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
7 changes: 2 additions & 5 deletions SIL.Windows.Forms/ImageToolbox/PalasoImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
private string _pathForSavingMetadataChanges;

Expand All @@ -70,8 +70,6 @@ public PalasoImage(Image image)
Metadata = new Metadata();
}



public static PalasoImage FromImage(Image image)
{
Guard.AgainstNull(image, "image");
Expand All @@ -81,7 +79,6 @@ public static PalasoImage FromImage(Image image)
};
}


private Image _image;

public Image Image
Expand Down
12 changes: 12 additions & 0 deletions SIL.Windows.Forms/Widgets/SilResources.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit d85d3dd

Please sign in to comment.