Compare commits
4 Commits
master
...
release/0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7df8e62a5a | ||
|
|
5fa20668db | ||
|
|
a382ab8dad | ||
|
|
8bfc839930 |
@ -4,11 +4,16 @@
|
|||||||
{
|
{
|
||||||
public int Version { get; set; } = 1;
|
public int Version { get; set; } = 1;
|
||||||
|
|
||||||
|
public string Format { get; set; } = "suzumagnifier";
|
||||||
|
|
||||||
|
public bool ReadOnly { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
public bool AutoStart { get; set; }
|
public bool AutoStart { get; set; }
|
||||||
|
|
||||||
public bool HighQuality { get; set; }
|
public bool HighQuality { get; set; }
|
||||||
|
|
||||||
public int ZoomFactor { get; set; }
|
public decimal ZoomFactor { get; set; }
|
||||||
|
|
||||||
public int UpdateFrequency { get; set; }
|
public int UpdateFrequency { get; set; }
|
||||||
|
|
||||||
@ -16,7 +21,9 @@
|
|||||||
|
|
||||||
public int CrosshairSize { get; set; }
|
public int CrosshairSize { get; set; }
|
||||||
|
|
||||||
public Color CrosshairColour { get; set; }
|
public string? CrosshairColour { get; set; }
|
||||||
|
|
||||||
|
public bool ShowAlwaysOnTop { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
91
source/Form1.Designer.cs
generated
@ -44,8 +44,6 @@
|
|||||||
toolStripSeparator3 = new ToolStripSeparator();
|
toolStripSeparator3 = new ToolStripSeparator();
|
||||||
resetToolStripMenuItem = new ToolStripMenuItem();
|
resetToolStripMenuItem = new ToolStripMenuItem();
|
||||||
toolStripMenuItem9 = new ToolStripMenuItem();
|
toolStripMenuItem9 = new ToolStripMenuItem();
|
||||||
showToolStripMenuItem = new ToolStripMenuItem();
|
|
||||||
toolStripSeparator5 = new ToolStripSeparator();
|
|
||||||
sizeToolStripMenuItem = new ToolStripMenuItem();
|
sizeToolStripMenuItem = new ToolStripMenuItem();
|
||||||
smallToolStripMenuItem = new ToolStripMenuItem();
|
smallToolStripMenuItem = new ToolStripMenuItem();
|
||||||
mediumToolStripMenuItem = new ToolStripMenuItem();
|
mediumToolStripMenuItem = new ToolStripMenuItem();
|
||||||
@ -62,7 +60,13 @@
|
|||||||
toolStripMenuItem5 = new ToolStripMenuItem();
|
toolStripMenuItem5 = new ToolStripMenuItem();
|
||||||
toolStripMenuItem3 = new ToolStripMenuItem();
|
toolStripMenuItem3 = new ToolStripMenuItem();
|
||||||
toolStripSeparator1 = new ToolStripSeparator();
|
toolStripSeparator1 = new ToolStripSeparator();
|
||||||
|
toolStripMenuItem10 = new ToolStripMenuItem();
|
||||||
|
viewHelpToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
aboutToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
toolStripSeparator6 = new ToolStripSeparator();
|
||||||
exitiToolStripMenuItem = new ToolStripMenuItem();
|
exitiToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
toolStripMenuItem11 = new ToolStripMenuItem();
|
||||||
|
toolStripSeparator7 = new ToolStripSeparator();
|
||||||
contextMenuStrip1.SuspendLayout();
|
contextMenuStrip1.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -75,13 +79,14 @@
|
|||||||
//
|
//
|
||||||
// contextMenuStrip1
|
// contextMenuStrip1
|
||||||
//
|
//
|
||||||
contextMenuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItem1, toolStripMenuItem2, toolStripSeparator2, toolStripMenuItem4, toolStripMenuItem6, toolStripMenuItem9, toolStripSeparator4, toolStripMenuItem5, toolStripMenuItem3, toolStripSeparator1, exitiToolStripMenuItem });
|
contextMenuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItem1, toolStripMenuItem2, toolStripSeparator2, toolStripMenuItem4, toolStripMenuItem6, toolStripMenuItem9, toolStripSeparator4, toolStripMenuItem5, toolStripMenuItem3, toolStripSeparator1, toolStripMenuItem10, toolStripSeparator6, exitiToolStripMenuItem });
|
||||||
contextMenuStrip1.Name = "contextMenuStrip1";
|
contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
contextMenuStrip1.Size = new Size(205, 198);
|
contextMenuStrip1.Size = new Size(205, 248);
|
||||||
contextMenuStrip1.Opening += contextMenuStrip1_Opening;
|
contextMenuStrip1.Opening += contextMenuStrip1_Opening;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem1
|
// toolStripMenuItem1
|
||||||
//
|
//
|
||||||
|
toolStripMenuItem1.Image = Resource1.play;
|
||||||
toolStripMenuItem1.Name = "toolStripMenuItem1";
|
toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||||
toolStripMenuItem1.Size = new Size(204, 22);
|
toolStripMenuItem1.Size = new Size(204, 22);
|
||||||
toolStripMenuItem1.Text = "&Start";
|
toolStripMenuItem1.Text = "&Start";
|
||||||
@ -89,6 +94,7 @@
|
|||||||
//
|
//
|
||||||
// toolStripMenuItem2
|
// toolStripMenuItem2
|
||||||
//
|
//
|
||||||
|
toolStripMenuItem2.Image = Resource1.pause;
|
||||||
toolStripMenuItem2.Name = "toolStripMenuItem2";
|
toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||||
toolStripMenuItem2.Size = new Size(204, 22);
|
toolStripMenuItem2.Size = new Size(204, 22);
|
||||||
toolStripMenuItem2.Text = "Sto&p";
|
toolStripMenuItem2.Text = "Sto&p";
|
||||||
@ -123,6 +129,7 @@
|
|||||||
// toolStripMenuItem6
|
// toolStripMenuItem6
|
||||||
//
|
//
|
||||||
toolStripMenuItem6.DropDownItems.AddRange(new ToolStripItem[] { toolStripMenuItem7, toolStripMenuItem8, toolStripSeparator3, resetToolStripMenuItem });
|
toolStripMenuItem6.DropDownItems.AddRange(new ToolStripItem[] { toolStripMenuItem7, toolStripMenuItem8, toolStripSeparator3, resetToolStripMenuItem });
|
||||||
|
toolStripMenuItem6.Image = Resource1.search;
|
||||||
toolStripMenuItem6.Name = "toolStripMenuItem6";
|
toolStripMenuItem6.Name = "toolStripMenuItem6";
|
||||||
toolStripMenuItem6.Size = new Size(204, 22);
|
toolStripMenuItem6.Size = new Size(204, 22);
|
||||||
toolStripMenuItem6.Text = "Zoom";
|
toolStripMenuItem6.Text = "Zoom";
|
||||||
@ -158,48 +165,37 @@
|
|||||||
//
|
//
|
||||||
// toolStripMenuItem9
|
// toolStripMenuItem9
|
||||||
//
|
//
|
||||||
toolStripMenuItem9.DropDownItems.AddRange(new ToolStripItem[] { showToolStripMenuItem, toolStripSeparator5, sizeToolStripMenuItem, colourToolStripMenuItem });
|
toolStripMenuItem9.DropDownItems.AddRange(new ToolStripItem[] { sizeToolStripMenuItem, colourToolStripMenuItem });
|
||||||
|
toolStripMenuItem9.Image = Resource1.crosshair;
|
||||||
toolStripMenuItem9.Name = "toolStripMenuItem9";
|
toolStripMenuItem9.Name = "toolStripMenuItem9";
|
||||||
toolStripMenuItem9.Size = new Size(204, 22);
|
toolStripMenuItem9.Size = new Size(204, 22);
|
||||||
toolStripMenuItem9.Text = "Crosshair";
|
toolStripMenuItem9.Text = "Crosshair";
|
||||||
//
|
//
|
||||||
// showToolStripMenuItem
|
|
||||||
//
|
|
||||||
showToolStripMenuItem.Name = "showToolStripMenuItem";
|
|
||||||
showToolStripMenuItem.Size = new Size(110, 22);
|
|
||||||
showToolStripMenuItem.Text = "Show";
|
|
||||||
showToolStripMenuItem.Click += showToolStripMenuItem_Click;
|
|
||||||
//
|
|
||||||
// toolStripSeparator5
|
|
||||||
//
|
|
||||||
toolStripSeparator5.Name = "toolStripSeparator5";
|
|
||||||
toolStripSeparator5.Size = new Size(107, 6);
|
|
||||||
//
|
|
||||||
// sizeToolStripMenuItem
|
// sizeToolStripMenuItem
|
||||||
//
|
//
|
||||||
sizeToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { smallToolStripMenuItem, mediumToolStripMenuItem, largeToolStripMenuItem });
|
sizeToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { toolStripMenuItem11, toolStripSeparator7, smallToolStripMenuItem, mediumToolStripMenuItem, largeToolStripMenuItem });
|
||||||
sizeToolStripMenuItem.Name = "sizeToolStripMenuItem";
|
sizeToolStripMenuItem.Name = "sizeToolStripMenuItem";
|
||||||
sizeToolStripMenuItem.Size = new Size(110, 22);
|
sizeToolStripMenuItem.Size = new Size(180, 22);
|
||||||
sizeToolStripMenuItem.Text = "Size";
|
sizeToolStripMenuItem.Text = "Size";
|
||||||
//
|
//
|
||||||
// smallToolStripMenuItem
|
// smallToolStripMenuItem
|
||||||
//
|
//
|
||||||
smallToolStripMenuItem.Name = "smallToolStripMenuItem";
|
smallToolStripMenuItem.Name = "smallToolStripMenuItem";
|
||||||
smallToolStripMenuItem.Size = new Size(119, 22);
|
smallToolStripMenuItem.Size = new Size(180, 22);
|
||||||
smallToolStripMenuItem.Text = "Small";
|
smallToolStripMenuItem.Text = "Small";
|
||||||
smallToolStripMenuItem.Click += smallToolStripMenuItem_Click;
|
smallToolStripMenuItem.Click += smallToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// mediumToolStripMenuItem
|
// mediumToolStripMenuItem
|
||||||
//
|
//
|
||||||
mediumToolStripMenuItem.Name = "mediumToolStripMenuItem";
|
mediumToolStripMenuItem.Name = "mediumToolStripMenuItem";
|
||||||
mediumToolStripMenuItem.Size = new Size(119, 22);
|
mediumToolStripMenuItem.Size = new Size(180, 22);
|
||||||
mediumToolStripMenuItem.Text = "Medium";
|
mediumToolStripMenuItem.Text = "Medium";
|
||||||
mediumToolStripMenuItem.Click += mediumToolStripMenuItem_Click;
|
mediumToolStripMenuItem.Click += mediumToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// largeToolStripMenuItem
|
// largeToolStripMenuItem
|
||||||
//
|
//
|
||||||
largeToolStripMenuItem.Name = "largeToolStripMenuItem";
|
largeToolStripMenuItem.Name = "largeToolStripMenuItem";
|
||||||
largeToolStripMenuItem.Size = new Size(119, 22);
|
largeToolStripMenuItem.Size = new Size(180, 22);
|
||||||
largeToolStripMenuItem.Text = "Large";
|
largeToolStripMenuItem.Text = "Large";
|
||||||
largeToolStripMenuItem.Click += largeToolStripMenuItem_Click;
|
largeToolStripMenuItem.Click += largeToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
@ -207,7 +203,7 @@
|
|||||||
//
|
//
|
||||||
colourToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { agentaToolStripMenuItem, cyanToolStripMenuItem, yellowToolStripMenuItem, greenToolStripMenuItem, redToolStripMenuItem, blackToolStripMenuItem, whiteToolStripMenuItem });
|
colourToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { agentaToolStripMenuItem, cyanToolStripMenuItem, yellowToolStripMenuItem, greenToolStripMenuItem, redToolStripMenuItem, blackToolStripMenuItem, whiteToolStripMenuItem });
|
||||||
colourToolStripMenuItem.Name = "colourToolStripMenuItem";
|
colourToolStripMenuItem.Name = "colourToolStripMenuItem";
|
||||||
colourToolStripMenuItem.Size = new Size(110, 22);
|
colourToolStripMenuItem.Size = new Size(180, 22);
|
||||||
colourToolStripMenuItem.Text = "Colour";
|
colourToolStripMenuItem.Text = "Colour";
|
||||||
//
|
//
|
||||||
// agentaToolStripMenuItem
|
// agentaToolStripMenuItem
|
||||||
@ -274,6 +270,7 @@
|
|||||||
//
|
//
|
||||||
// toolStripMenuItem3
|
// toolStripMenuItem3
|
||||||
//
|
//
|
||||||
|
toolStripMenuItem3.Image = Resource1.fullscreen;
|
||||||
toolStripMenuItem3.Name = "toolStripMenuItem3";
|
toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||||
toolStripMenuItem3.ShortcutKeys = Keys.F11;
|
toolStripMenuItem3.ShortcutKeys = Keys.F11;
|
||||||
toolStripMenuItem3.Size = new Size(204, 22);
|
toolStripMenuItem3.Size = new Size(204, 22);
|
||||||
@ -285,6 +282,34 @@
|
|||||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
toolStripSeparator1.Size = new Size(201, 6);
|
toolStripSeparator1.Size = new Size(201, 6);
|
||||||
//
|
//
|
||||||
|
// toolStripMenuItem10
|
||||||
|
//
|
||||||
|
toolStripMenuItem10.DropDownItems.AddRange(new ToolStripItem[] { viewHelpToolStripMenuItem, aboutToolStripMenuItem });
|
||||||
|
toolStripMenuItem10.Name = "toolStripMenuItem10";
|
||||||
|
toolStripMenuItem10.Size = new Size(204, 22);
|
||||||
|
toolStripMenuItem10.Text = "&Help";
|
||||||
|
//
|
||||||
|
// viewHelpToolStripMenuItem
|
||||||
|
//
|
||||||
|
viewHelpToolStripMenuItem.Image = Resource1.help_circle;
|
||||||
|
viewHelpToolStripMenuItem.Name = "viewHelpToolStripMenuItem";
|
||||||
|
viewHelpToolStripMenuItem.ShortcutKeys = Keys.F1;
|
||||||
|
viewHelpToolStripMenuItem.Size = new Size(146, 22);
|
||||||
|
viewHelpToolStripMenuItem.Text = "View &Help";
|
||||||
|
viewHelpToolStripMenuItem.Click += viewHelpToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// aboutToolStripMenuItem
|
||||||
|
//
|
||||||
|
aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||||
|
aboutToolStripMenuItem.Size = new Size(146, 22);
|
||||||
|
aboutToolStripMenuItem.Text = "&About";
|
||||||
|
aboutToolStripMenuItem.Click += aboutToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// toolStripSeparator6
|
||||||
|
//
|
||||||
|
toolStripSeparator6.Name = "toolStripSeparator6";
|
||||||
|
toolStripSeparator6.Size = new Size(201, 6);
|
||||||
|
//
|
||||||
// exitiToolStripMenuItem
|
// exitiToolStripMenuItem
|
||||||
//
|
//
|
||||||
exitiToolStripMenuItem.Name = "exitiToolStripMenuItem";
|
exitiToolStripMenuItem.Name = "exitiToolStripMenuItem";
|
||||||
@ -292,6 +317,18 @@
|
|||||||
exitiToolStripMenuItem.Text = "E&xit";
|
exitiToolStripMenuItem.Text = "E&xit";
|
||||||
exitiToolStripMenuItem.Click += exitiToolStripMenuItem_Click;
|
exitiToolStripMenuItem.Click += exitiToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
|
// toolStripMenuItem11
|
||||||
|
//
|
||||||
|
toolStripMenuItem11.Name = "toolStripMenuItem11";
|
||||||
|
toolStripMenuItem11.Size = new Size(180, 22);
|
||||||
|
toolStripMenuItem11.Text = "None";
|
||||||
|
toolStripMenuItem11.Click += toolStripMenuItem11_Click;
|
||||||
|
//
|
||||||
|
// toolStripSeparator7
|
||||||
|
//
|
||||||
|
toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
|
toolStripSeparator7.Size = new Size(177, 6);
|
||||||
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(96F, 96F);
|
AutoScaleDimensions = new SizeF(96F, 96F);
|
||||||
@ -327,10 +364,8 @@
|
|||||||
private ToolStripMenuItem resetToolStripMenuItem;
|
private ToolStripMenuItem resetToolStripMenuItem;
|
||||||
private ToolStripSeparator toolStripSeparator4;
|
private ToolStripSeparator toolStripSeparator4;
|
||||||
private ToolStripMenuItem toolStripMenuItem9;
|
private ToolStripMenuItem toolStripMenuItem9;
|
||||||
private ToolStripMenuItem showToolStripMenuItem;
|
|
||||||
private ToolStripMenuItem sizeToolStripMenuItem;
|
private ToolStripMenuItem sizeToolStripMenuItem;
|
||||||
private ToolStripMenuItem colourToolStripMenuItem;
|
private ToolStripMenuItem colourToolStripMenuItem;
|
||||||
private ToolStripSeparator toolStripSeparator5;
|
|
||||||
private ToolStripMenuItem smallToolStripMenuItem;
|
private ToolStripMenuItem smallToolStripMenuItem;
|
||||||
private ToolStripMenuItem mediumToolStripMenuItem;
|
private ToolStripMenuItem mediumToolStripMenuItem;
|
||||||
private ToolStripMenuItem largeToolStripMenuItem;
|
private ToolStripMenuItem largeToolStripMenuItem;
|
||||||
@ -341,5 +376,11 @@
|
|||||||
private ToolStripMenuItem redToolStripMenuItem;
|
private ToolStripMenuItem redToolStripMenuItem;
|
||||||
private ToolStripMenuItem blackToolStripMenuItem;
|
private ToolStripMenuItem blackToolStripMenuItem;
|
||||||
private ToolStripMenuItem whiteToolStripMenuItem;
|
private ToolStripMenuItem whiteToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem toolStripMenuItem10;
|
||||||
|
private ToolStripMenuItem viewHelpToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem aboutToolStripMenuItem;
|
||||||
|
private ToolStripSeparator toolStripSeparator6;
|
||||||
|
private ToolStripMenuItem toolStripMenuItem11;
|
||||||
|
private ToolStripSeparator toolStripSeparator7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
195
source/Form1.cs
@ -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;
|
||||||
@ -27,7 +28,7 @@ namespace SuzuMagnifier
|
|||||||
|
|
||||||
private readonly System.Windows.Forms.Timer _timer = new();
|
private readonly System.Windows.Forms.Timer _timer = new();
|
||||||
private Bitmap? _bitmap;
|
private Bitmap? _bitmap;
|
||||||
private string jsonfigFilename;
|
private string _jsonfigFilename;
|
||||||
|
|
||||||
|
|
||||||
public Form1()
|
public Form1()
|
||||||
@ -52,26 +53,31 @@ namespace SuzuMagnifier
|
|||||||
|
|
||||||
var args = GetCommandLine()!;
|
var args = GetCommandLine()!;
|
||||||
|
|
||||||
jsonfigFilename = args.Where(x => (x.Key.Equals("o") || x.Key.Equals("open"))).Select(x => x.Value).FirstOrDefault();
|
_jsonfigFilename = args.Where(x => (x.Key.Equals("o") || x.Key.Equals("open"))).Select(x => x.Value).FirstOrDefault();
|
||||||
if (string.IsNullOrWhiteSpace(jsonfigFilename))
|
if (string.IsNullOrWhiteSpace(_jsonfigFilename))
|
||||||
{
|
{
|
||||||
jsonfigFilename = Path.ChangeExtension(Application.ExecutablePath, "jsonfig");
|
_jsonfigFilename = Path.ChangeExtension(Application.ExecutablePath, "jsonfig");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (System.IO.File.Exists(jsonfigFilename))
|
if (System.IO.File.Exists(_jsonfigFilename))
|
||||||
{
|
{
|
||||||
var newSettings = await LoadSettings(jsonfigFilename);
|
this.SavedOptions = await LoadSettings(_jsonfigFilename);
|
||||||
if (newSettings == null)
|
|
||||||
|
this.TopMost = this.SavedOptions!.ShowAlwaysOnTop;
|
||||||
|
this.HighQuality = this.SavedOptions.HighQuality;
|
||||||
|
this.ZoomFactor = this.SavedOptions.ZoomFactor;
|
||||||
|
this.UpdateFrequency = this.SavedOptions.UpdateFrequency;
|
||||||
|
this.CrosshairSize = this.SavedOptions.CrosshairSize;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.SavedOptions.CrosshairColour))
|
||||||
{
|
{
|
||||||
newSettings = new SavedOptions();
|
this.CrosshairColour = ColorTranslator.FromHtml(this.SavedOptions!.CrosshairColour);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.HighQuality = newSettings.HighQuality;
|
if (this.SavedOptions!.AutoStart)
|
||||||
this.ZoomFactor = newSettings.ZoomFactor;
|
{
|
||||||
//this.UpdateFrequency = newSettings.UpdateFrequency;
|
_timer.Start();
|
||||||
this.ShowCrosshair = newSettings.ShowCrosshair;
|
}
|
||||||
this.CrosshairSize = newSettings.CrosshairSize;
|
|
||||||
this.CrosshairColour = newSettings.CrosshairColour;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +120,7 @@ namespace SuzuMagnifier
|
|||||||
g.DrawImage(_bitmap, this.ClientRectangle);
|
g.DrawImage(_bitmap, this.ClientRectangle);
|
||||||
|
|
||||||
// Draw center crosshair
|
// Draw center crosshair
|
||||||
if (this.ShowCrosshair)
|
if (this.CrosshairSize > 0)
|
||||||
{
|
{
|
||||||
var cx = Divide(this.Width, 2);
|
var cx = Divide(this.Width, 2);
|
||||||
var cy = Divide(this.Height, 2);
|
var cy = Divide(this.Height, 2);
|
||||||
@ -179,10 +185,15 @@ namespace SuzuMagnifier
|
|||||||
{
|
{
|
||||||
base.OnFormClosing(e);
|
base.OnFormClosing(e);
|
||||||
|
|
||||||
|
if (this.SavedOptions.ReadOnly)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var result = MessageBox.Show("Do you want to save settings to file?", "Save Settings?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
var result = MessageBox.Show("Do you want to save settings to file?", "Save Settings?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||||
if (result == DialogResult.Yes)
|
if (result == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
var result2 = await SaveSettings(jsonfigFilename);
|
var result2 = await SaveSettings(_jsonfigFilename);
|
||||||
if (result2)
|
if (result2)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -203,58 +214,20 @@ namespace SuzuMagnifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
|
public SavedOptions SavedOptions { get => field ?? new SavedOptions(); private set => field = value; }
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public bool HighQuality { get; set; } = false;
|
public bool HighQuality { get; set; } = false;
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public int ZoomFactor
|
public decimal ZoomFactor { get => field; set => field = Math.Clamp(value, 1, 20); } = 2;
|
||||||
{
|
|
||||||
get => field;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value < 0)
|
|
||||||
{
|
|
||||||
field = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value > 20)
|
|
||||||
{
|
|
||||||
field = 20;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
field = value;
|
|
||||||
}
|
|
||||||
} = 2;
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public int UpdateFrequency { get; set; } = 33;
|
public int UpdateFrequency { get; set; } = 33;
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public bool ShowCrosshair { get; set; } = true;
|
public int CrosshairSize { get => field; set => field = Math.Clamp(value, 0, 200); } = 20;
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public int CrosshairSize
|
|
||||||
{
|
|
||||||
get => field;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value < 5)
|
|
||||||
{
|
|
||||||
field = 5;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value > 200)
|
|
||||||
{
|
|
||||||
field = 200;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
field = value;
|
|
||||||
}
|
|
||||||
} = 20;
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public Color CrosshairColour { get; set; } = Color.FromArgb(255, 255, 0);
|
public Color CrosshairColour { get; set; } = Color.FromArgb(255, 255, 0);
|
||||||
@ -267,18 +240,20 @@ namespace SuzuMagnifier
|
|||||||
|
|
||||||
toolStripMenuItem5.Checked = this.TopMost;
|
toolStripMenuItem5.Checked = this.TopMost;
|
||||||
|
|
||||||
showToolStripMenuItem.Checked = this.ShowCrosshair;
|
toolStripMenuItem11.Checked = (this.CrosshairSize == 0);
|
||||||
smallToolStripMenuItem.Checked = (this.CrosshairSize == 10);
|
smallToolStripMenuItem.Checked = (this.CrosshairSize == 10);
|
||||||
mediumToolStripMenuItem.Checked = (this.CrosshairSize == 20);
|
mediumToolStripMenuItem.Checked = (this.CrosshairSize == 20);
|
||||||
largeToolStripMenuItem.Checked = (this.CrosshairSize == 50);
|
largeToolStripMenuItem.Checked = (this.CrosshairSize == 50);
|
||||||
|
|
||||||
agentaToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(255, 0, 255);
|
resetToolStripMenuItem.Checked = (this.ZoomFactor == 1);
|
||||||
cyanToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(0, 255, 255);
|
|
||||||
yellowToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(255, 255, 0);
|
agentaToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(255, 0, 255));
|
||||||
greenToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(0, 255, 0);
|
cyanToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(0, 255, 255));
|
||||||
redToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(255, 0, 0);
|
yellowToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(255, 255, 0));
|
||||||
blackToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(0, 0, 0);
|
greenToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(0, 255, 0));
|
||||||
whiteToolStripMenuItem.Checked = this.CrosshairColour == Color.FromArgb(255, 255, 255);
|
redToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(255, 0, 0));
|
||||||
|
blackToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(0, 0, 0));
|
||||||
|
whiteToolStripMenuItem.Checked = (this.CrosshairColour == Color.FromArgb(255, 255, 255));
|
||||||
|
|
||||||
fasterToolStripMenuItem.Checked = !this.HighQuality;
|
fasterToolStripMenuItem.Checked = !this.HighQuality;
|
||||||
fasterToolStripMenuItem.Enabled = this.HighQuality;
|
fasterToolStripMenuItem.Enabled = this.HighQuality;
|
||||||
@ -346,7 +321,7 @@ namespace SuzuMagnifier
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void toolStripMenuItem7_Click(object sender, EventArgs e)
|
private void toolStripMenuItem7_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.ZoomFactor++;
|
this.ZoomFactor += 0.2m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -356,7 +331,7 @@ namespace SuzuMagnifier
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void toolStripMenuItem8_Click(object sender, EventArgs e)
|
private void toolStripMenuItem8_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.ZoomFactor--;
|
this.ZoomFactor -= 0.2m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -468,6 +443,44 @@ namespace SuzuMagnifier
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Help, view help
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void viewHelpToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Process.Start(new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = Resource1.AppHelpURL,
|
||||||
|
UseShellExecute = true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Help, about
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exit
|
/// Exit
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -485,17 +498,17 @@ namespace SuzuMagnifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Crosshair, toggle
|
/// Crosshair, size, off
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void showToolStripMenuItem_Click(object sender, EventArgs e)
|
private void toolStripMenuItem11_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.ShowCrosshair = !this.ShowCrosshair;
|
this.CrosshairSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Croisshair, size, small
|
/// Crosshair, size, small
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
@ -505,7 +518,7 @@ namespace SuzuMagnifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Croisshair, size, medium
|
/// Crosshair, size, medium
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
@ -515,7 +528,7 @@ namespace SuzuMagnifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Croisshair, size, large
|
/// Crosshair, size, large
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
@ -557,6 +570,11 @@ namespace SuzuMagnifier
|
|||||||
return (int)Math.Floor((decimal)x / y);
|
return (int)Math.Floor((decimal)x / y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int Divide(int x, decimal y)
|
||||||
|
{
|
||||||
|
return (int)Math.Floor((decimal)x / y);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get execution arguments.
|
/// Get execution arguments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -622,31 +640,38 @@ namespace SuzuMagnifier
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SavedOptions response;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return System.Text.Json.JsonSerializer.Deserialize<SavedOptions>(sourceCode);
|
response = System.Text.Json.JsonSerializer.Deserialize<SavedOptions>(sourceCode);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!response!.Format.Equals(Resource1.FileFormat, StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool> SaveSettings(string filename)
|
private async Task<bool> SaveSettings(string filename)
|
||||||
{
|
{
|
||||||
var result = new SavedOptions();
|
//_savedOptions.AutoStart = false;
|
||||||
result.AutoStart = false;
|
this.SavedOptions.HighQuality = this.HighQuality;
|
||||||
result.HighQuality = this.HighQuality;
|
this.SavedOptions.ZoomFactor = this.ZoomFactor;
|
||||||
result.ZoomFactor = this.ZoomFactor;
|
this.SavedOptions.UpdateFrequency = this.UpdateFrequency;
|
||||||
result.UpdateFrequency = this.UpdateFrequency;
|
this.SavedOptions.CrosshairSize = this.CrosshairSize;
|
||||||
result.ShowCrosshair = this.ShowCrosshair;
|
this.SavedOptions.CrosshairColour = $"#{this.CrosshairColour.R:X2}{this.CrosshairColour.G:X2}{this.CrosshairColour.B:X2}";
|
||||||
result.CrosshairSize = this.CrosshairSize;
|
this.SavedOptions.ShowAlwaysOnTop = this.TopMost;
|
||||||
result.CrosshairColour = this.CrosshairColour;
|
|
||||||
|
|
||||||
string sourceCode = "";
|
string sourceCode = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sourceCode = System.Text.Json.JsonSerializer.Serialize(result);
|
sourceCode = System.Text.Json.JsonSerializer.Serialize(this.SavedOptions);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
141
source/Resource1.Designer.cs
generated
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace SuzuMagnifier {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resource1 {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resource1() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SuzuMagnifier.Resource1", typeof(Resource1).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap crosshair {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("crosshair", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to suzumagnifier.
|
||||||
|
/// </summary>
|
||||||
|
internal static string FileFormat {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FileFormat", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fullscreen {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fullscreen", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap help_circle {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("help_circle", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap pause {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("pause", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap play {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("play", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap search {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("search", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
145
source/Resource1.resx
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</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" />
|
||||||
|
<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>
|
||||||
|
</data>
|
||||||
|
<data name="FileFormat" xml:space="preserve">
|
||||||
|
<value>suzumagnifier</value>
|
||||||
|
</data>
|
||||||
|
<data name="fullscreen" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>Resources\fullscreen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="help_circle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>Resources\help-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>Resources\pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="play" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>Resources\play.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="search" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
BIN
source/Resources/crosshair.png
Normal file
|
After Width: | Height: | Size: 752 B |
BIN
source/Resources/fullscreen.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
source/Resources/help-circle.png
Normal file
|
After Width: | Height: | Size: 847 B |
BIN
source/Resources/pause.png
Normal file
|
After Width: | Height: | Size: 237 B |
BIN
source/Resources/play.png
Normal file
|
After Width: | Height: | Size: 590 B |
77
source/Resources/raw/crosshair.svg
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="lucide lucide-crosshair-icon lucide-crosshair"
|
||||||
|
version="1.1"
|
||||||
|
id="svg12"
|
||||||
|
sodipodi:docname="crosshair.svg"
|
||||||
|
inkscape:export-filename="L:\gitea-hiimray\SuzuMagnifier\source\Resources\raw\crosshair.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs16" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview14"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="34.666667"
|
||||||
|
inkscape:cx="11.985577"
|
||||||
|
inkscape:cy="12.014423"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="1912"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg12" />
|
||||||
|
<circle
|
||||||
|
cx="12"
|
||||||
|
cy="12"
|
||||||
|
r="10"
|
||||||
|
id="circle2"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
<line
|
||||||
|
x1="22"
|
||||||
|
x2="18"
|
||||||
|
y1="12"
|
||||||
|
y2="12"
|
||||||
|
id="line4"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
<line
|
||||||
|
x1="6"
|
||||||
|
x2="2"
|
||||||
|
y1="12"
|
||||||
|
y2="12"
|
||||||
|
id="line6"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
<line
|
||||||
|
x1="12"
|
||||||
|
x2="12"
|
||||||
|
y1="6"
|
||||||
|
y2="2"
|
||||||
|
id="line8"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
<line
|
||||||
|
x1="12"
|
||||||
|
x2="12"
|
||||||
|
y1="22"
|
||||||
|
y2="18"
|
||||||
|
id="line10"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
1
source/Resources/raw/fullscreen.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-fullscreen-icon lucide-fullscreen"><path d="M3 7V5a2 2 0 0 1 2-2h2"/><path d="M17 3h2a2 2 0 0 1 2 2v2"/><path d="M21 17v2a2 2 0 0 1-2 2h-2"/><path d="M7 21H5a2 2 0 0 1-2-2v-2"/><rect width="10" height="8" x="7" y="8" rx="1"/></svg>
|
||||||
|
After Width: | Height: | Size: 433 B |
59
source/Resources/raw/pause.svg
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="lucide lucide-pause-icon lucide-pause"
|
||||||
|
version="1.1"
|
||||||
|
id="svg6"
|
||||||
|
sodipodi:docname="pause.svg"
|
||||||
|
inkscape:export-filename="L:\gitea-hiimray\SuzuMagnifier\source\Resources\raw\pause.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs10" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview8"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="34.666667"
|
||||||
|
inkscape:cx="11.985577"
|
||||||
|
inkscape:cy="12.014423"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="1912"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg6" />
|
||||||
|
<rect
|
||||||
|
x="14"
|
||||||
|
y="3"
|
||||||
|
width="5"
|
||||||
|
height="18"
|
||||||
|
rx="1"
|
||||||
|
id="rect2"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
x="5"
|
||||||
|
y="3"
|
||||||
|
width="5"
|
||||||
|
height="18"
|
||||||
|
rx="1"
|
||||||
|
id="rect4"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
47
source/Resources/raw/play.svg
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="lucide lucide-play-icon lucide-play"
|
||||||
|
version="1.1"
|
||||||
|
id="svg4"
|
||||||
|
sodipodi:docname="play.svg"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
inkscape:export-filename="L:\gitea-hiimray\SuzuMagnifier\source\Resources\raw\play.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs8" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview6"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="34.666667"
|
||||||
|
inkscape:cx="11.985577"
|
||||||
|
inkscape:cy="12.014423"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="1912"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg4" />
|
||||||
|
<path
|
||||||
|
d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"
|
||||||
|
id="path2"
|
||||||
|
style="stroke:#808080;stroke-opacity:1" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
source/Resources/search.png
Normal file
|
After Width: | Height: | Size: 674 B |
@ -6,7 +6,7 @@
|
|||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Title>Suzu Magnifier</Title>
|
<Title>Suzu Magnifier</Title>
|
||||||
<Version>0.1.0.145</Version>
|
<Version>0.1.0.214</Version>
|
||||||
<Product>Suzu Magnifier</Product>
|
<Product>Suzu Magnifier</Product>
|
||||||
<Company>Hi, I'm Ray</Company>
|
<Company>Hi, I'm Ray</Company>
|
||||||
<Authors>Ray Lam</Authors>
|
<Authors>Ray Lam</Authors>
|
||||||
@ -15,11 +15,11 @@
|
|||||||
<NoWin32Manifest>true</NoWin32Manifest>
|
<NoWin32Manifest>true</NoWin32Manifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>full</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>full</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -33,4 +33,19 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Resource1.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resource1.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Resource1.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||