1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2026-02-22 04:13:24 +00:00

Fixes due to the merge with Yilanst master

This commit is contained in:
Troy Cook
2020-11-22 18:02:50 -06:00
parent 24baface6d
commit e6544b0ca0
6 changed files with 33 additions and 41 deletions

View File

@@ -246,7 +246,7 @@ namespace MeshCentralRouter
updateLocalFileView();
// Restore Window Location
string locationStr = getRegValue("filelocation", "");
string locationStr = Settings.GetRegValue("filelocation", "");
if (locationStr != null)
{
string[] locationSplit = locationStr.Split(',');
@@ -615,7 +615,7 @@ namespace MeshCentralRouter
node.fileViewer = null;
// Save window location
setRegValue("filelocation", Location.X + "," + Location.Y + "," + Size.Width + "," + Size.Height);
Settings.SetRegValue("filelocation", Location.X + "," + Location.Y + "," + Size.Width + "," + Size.Height);
}
public delegate void displayMessageHandler(string msg);
@@ -1216,15 +1216,6 @@ namespace MeshCentralRouter
}
}
public void setRegValue(string name, string value)
{
try { Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Open Source\MeshCentral Router", name, value); } catch (Exception) { }
}
public string getRegValue(string name, string value)
{
try { return Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Open Source\MeshCentral Router", name, value).ToString(); } catch (Exception) { return value; }
}
bool isPointVisibleOnAScreen(Point p)
{
foreach (Screen s in Screen.AllScreens) { if ((p.X < s.Bounds.Right) && (p.X > s.Bounds.Left) && (p.Y > s.Bounds.Top) && (p.Y < s.Bounds.Bottom)) return true; }