Added always-on-top to saved settings

Added view-help and about dialog
This commit is contained in:
Ray 2026-06-28 02:04:02 +01:00
parent 8bfc839930
commit a382ab8dad
4 changed files with 35 additions and 1 deletions

View File

@ -18,5 +18,8 @@
public Color CrosshairColour { get; set; } public Color CrosshairColour { get; set; }
public bool ShowAlwaysOnTop { get; set; }
} }
} }

View File

@ -1,4 +1,5 @@
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SuzuMagnifier.Dtos; using SuzuMagnifier.Dtos;
@ -66,6 +67,7 @@ namespace SuzuMagnifier
newSettings = new SavedOptions(); newSettings = new SavedOptions();
} }
this.TopMost = newSettings.ShowAlwaysOnTop;
this.HighQuality = newSettings.HighQuality; this.HighQuality = newSettings.HighQuality;
this.ZoomFactor = newSettings.ZoomFactor; this.ZoomFactor = newSettings.ZoomFactor;
//this.UpdateFrequency = newSettings.UpdateFrequency; //this.UpdateFrequency = newSettings.UpdateFrequency;
@ -476,7 +478,17 @@ namespace SuzuMagnifier
/// <param name="e"></param> /// <param name="e"></param>
private void viewHelpToolStripMenuItem_Click(object sender, EventArgs e) private void viewHelpToolStripMenuItem_Click(object sender, EventArgs e)
{ {
try
{
Process.Start(new ProcessStartInfo
{
FileName = Resource1.AppHelpURL,
UseShellExecute = true
});
}
catch (Exception)
{
}
} }
/// <summary> /// <summary>
@ -486,7 +498,13 @@ namespace SuzuMagnifier
/// <param name="e"></param> /// <param name="e"></param>
private void aboutToolStripMenuItem_Click(object sender, EventArgs e) 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.ShowCrosshair = this.ShowCrosshair;
result.CrosshairSize = this.CrosshairSize; result.CrosshairSize = this.CrosshairSize;
result.CrosshairColour = this.CrosshairColour; result.CrosshairColour = this.CrosshairColour;
result.ShowAlwaysOnTop = this.TopMost;
string sourceCode = ""; string sourceCode = "";
try try

View File

@ -60,6 +60,15 @@ namespace SuzuMagnifier {
} }
} }
/// <summary>
/// Looks up a localized string similar to https://www.hiimray.co.uk.
/// </summary>
internal static string AppHelpURL {
get {
return ResourceManager.GetString("AppHelpURL", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="AppHelpURL" xml:space="preserve">
<value>https://www.hiimray.co.uk</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="crosshair" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="crosshair" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\crosshair.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Resources\crosshair.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>