mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
fix issue 10: add -silent command option to suppress splash window
This commit is contained in:
parent
bd7baab613
commit
665954db26
1 changed files with 16 additions and 2 deletions
|
@ -12,8 +12,19 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
|||
/// </summary>
|
||||
static PersistentWindowProcessor pwp;
|
||||
[STAThread]
|
||||
static void Main()
|
||||
static void Main(string[] args)
|
||||
{
|
||||
bool no_splash = false;
|
||||
foreach (var arg in args)
|
||||
{
|
||||
switch(arg)
|
||||
{
|
||||
case "-silent":
|
||||
no_splash = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if (!DEBUG)
|
||||
Mutex singleInstMutex = new Mutex(true, Application.ProductName);
|
||||
if (!singleInstMutex.WaitOne(TimeSpan.Zero, true))
|
||||
|
@ -31,7 +42,10 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
|||
pwp = new PersistentWindowProcessor();
|
||||
pwp.Start();
|
||||
|
||||
StartSplashForm();
|
||||
if (!no_splash)
|
||||
{
|
||||
StartSplashForm();
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue