diff --git a/source/Dtos/SavedOptions.cs b/source/Dtos/SavedOptions.cs index eaf6bd2..bf34976 100644 --- a/source/Dtos/SavedOptions.cs +++ b/source/Dtos/SavedOptions.cs @@ -18,5 +18,8 @@ public Color CrosshairColour { get; set; } + public bool ShowAlwaysOnTop { get; set; } + + } } diff --git a/source/Form1.cs b/source/Form1.cs index 5d6e0e7..9461cac 100644 --- a/source/Form1.cs +++ b/source/Form1.cs @@ -1,4 +1,5 @@ using System.ComponentModel; +using System.Diagnostics; using System.Drawing.Drawing2D; using System.Runtime.InteropServices; using SuzuMagnifier.Dtos; @@ -66,6 +67,7 @@ namespace SuzuMagnifier newSettings = new SavedOptions(); } + this.TopMost = newSettings.ShowAlwaysOnTop; this.HighQuality = newSettings.HighQuality; this.ZoomFactor = newSettings.ZoomFactor; //this.UpdateFrequency = newSettings.UpdateFrequency; @@ -476,7 +478,17 @@ namespace SuzuMagnifier /// private void viewHelpToolStripMenuItem_Click(object sender, EventArgs e) { - + try + { + Process.Start(new ProcessStartInfo + { + FileName = Resource1.AppHelpURL, + UseShellExecute = true + }); + } + catch (Exception) + { + } } /// @@ -486,7 +498,13 @@ namespace SuzuMagnifier /// private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { + var version = Application.ProductVersion ?? string.Empty; + if (version.Contains("+")) + { + version = version.Substring(0, (version.IndexOf("+"))); + } + MessageBox.Show($"{Application.ProductName} v{version}", "About", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -664,6 +682,7 @@ namespace SuzuMagnifier result.ShowCrosshair = this.ShowCrosshair; result.CrosshairSize = this.CrosshairSize; result.CrosshairColour = this.CrosshairColour; + result.ShowAlwaysOnTop = this.TopMost; string sourceCode = ""; try diff --git a/source/Resource1.Designer.cs b/source/Resource1.Designer.cs index 41ccb2c..fb877ce 100644 --- a/source/Resource1.Designer.cs +++ b/source/Resource1.Designer.cs @@ -60,6 +60,15 @@ namespace SuzuMagnifier { } } + /// + /// Looks up a localized string similar to https://www.hiimray.co.uk. + /// + internal static string AppHelpURL { + get { + return ResourceManager.GetString("AppHelpURL", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/source/Resource1.resx b/source/Resource1.resx index f6ce03f..ef1aff2 100644 --- a/source/Resource1.resx +++ b/source/Resource1.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + https://www.hiimray.co.uk + Resources\crosshair.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a