Make Torch UI remember its last screen size/position. Fixes #260

(this is Jim's fault)
This commit is contained in:
Brant Martin
2019-02-25 14:06:38 -05:00
parent a673848089
commit 3e341e02c8
2 changed files with 4 additions and 2 deletions

View File

@@ -63,8 +63,8 @@ namespace Torch.Server
public bool EnableWhitelist { get; set; } = false;
public HashSet<ulong> Whitelist { get; set; } = new HashSet<ulong>();
internal Point WindowSize { get; set; } = new Point(800, 600);
internal Point WindowPosition { get; set; } = new Point();
public Point WindowSize { get; set; } = new Point(800, 600);
public Point WindowPosition { get; set; } = new Point();
public string LastUsedTheme { get; set; } = "Torch Theme";

View File

@@ -102,6 +102,8 @@ namespace Torch.Server
var newPos = new Point((int)Left, (int)Top);
_config.WindowPosition = newPos;
_config.Save(); //you idiot
if (_server?.State == ServerState.Running)
_server.Stop();