[PT Run] Closing PT Run and new settings app when PowerToys is not running (#3853)

Closing PowerLauncher, FZ Editor and new settings app when PowerToys is not running
This commit is contained in:
Yevhenii Holovachov
2020-06-10 20:58:34 +03:00
committed by GitHub
parent 38350a1ae4
commit 6fdfd3b9e7
7 changed files with 111 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ namespace FancyZonesEditor
ActiveZoneSetTmpFile,
AppliedZoneSetTmpFile,
CustomZoneSetsTmpFile,
PowerToysPID,
}
private static CanvasLayoutModel _blankCustomModel;
@@ -242,6 +243,13 @@ namespace FancyZonesEditor
private static string _customZoneSetsTmpFile;
public static int PowerToysPID
{
get { return _powerToysPID; }
}
private static int _powerToysPID;
// UpdateLayoutModels
// Update the five default layouts based on the new ZoneCount
private void UpdateLayoutModels()
@@ -410,7 +418,7 @@ namespace FancyZonesEditor
WorkArea = SystemParameters.WorkArea;
string[] args = Environment.GetCommandLineArgs();
if (args.Length == 5)
if (args.Length == 6)
{
var parsedLocation = args[(int)CmdArgs.X_Y_Width_Height].Split('_');
var x = int.Parse(parsedLocation[0]);
@@ -424,6 +432,8 @@ namespace FancyZonesEditor
_appliedZoneSetTmpFile = args[(int)CmdArgs.AppliedZoneSetTmpFile];
_customZoneSetsTmpFile = args[(int)CmdArgs.CustomZoneSetsTmpFile];
int.TryParse(args[(int)CmdArgs.PowerToysPID], out _powerToysPID);
ParseDeviceInfoData();
}
}