Allowing launcher to be run as startup project with no command line args (#4267)

This commit is contained in:
ryanbodrug-microsoft
2020-06-16 10:53:27 -07:00
committed by GitHub
parent 1a3500cad3
commit 7f25e3ba97

View File

@@ -38,8 +38,11 @@ namespace PowerLauncher
public static void Main(string[] args) public static void Main(string[] args)
{ {
if (SingleInstance<App>.InitializeAsFirstInstance(Unique)) if (SingleInstance<App>.InitializeAsFirstInstance(Unique))
{
if (args.Length > 0)
{ {
int.TryParse(args[0], out _powerToysPid); int.TryParse(args[0], out _powerToysPid);
}
using (var application = new App()) using (var application = new App())
{ {