public static void Main(string[] args) { var cmdLine = new CmdLineOptions(); var parsed = Parser.Default.ParseArguments <CmdLineOptions>(Environment.GetCommandLineArgs()); if (parsed is Parsed <CmdLineOptions> options) { cmdLine = options.Value; } SplashScreen splash = null; if (cmdLine.Start.IsNullOrEmpty()) { splash = new SplashScreen("SplashScreen.png"); splash.Show(false); } PlayniteSettings.ConfigureLogger(); var app = new DesktopApplication(new App(), splash, cmdLine); app.Run(); }
public static void Main(string[] args) { var cmdLine = new CmdLineOptions(); var parsed = Parser.Default.ParseArguments <CmdLineOptions>(Environment.GetCommandLineArgs()); if (parsed is Parsed <CmdLineOptions> options) { cmdLine = options.Value; } SplashScreen splash = null; var procCount = Process.GetProcesses().Where(a => a.ProcessName.StartsWith("Playnite.")).Count(); if (cmdLine.Start.IsNullOrEmpty() && !cmdLine.HideSplashScreen && procCount == 1) { splash = new SplashScreen("SplashScreen.png"); splash.Show(false); } PlayniteSettings.ConfigureLogger(); var app = new DesktopApplication(new App(), splash, cmdLine); app.Run(); }