mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 05:25:37 +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>
|
/// </summary>
|
||||||
static PersistentWindowProcessor pwp;
|
static PersistentWindowProcessor pwp;
|
||||||
[STAThread]
|
[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)
|
#if (!DEBUG)
|
||||||
Mutex singleInstMutex = new Mutex(true, Application.ProductName);
|
Mutex singleInstMutex = new Mutex(true, Application.ProductName);
|
||||||
if (!singleInstMutex.WaitOne(TimeSpan.Zero, true))
|
if (!singleInstMutex.WaitOne(TimeSpan.Zero, true))
|
||||||
|
@ -31,7 +42,10 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
pwp = new PersistentWindowProcessor();
|
pwp = new PersistentWindowProcessor();
|
||||||
pwp.Start();
|
pwp.Start();
|
||||||
|
|
||||||
StartSplashForm();
|
if (!no_splash)
|
||||||
|
{
|
||||||
|
StartSplashForm();
|
||||||
|
}
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue