mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 21:45:40 +02:00
Add enhancement request from #75, use -auto_restore_missing_windows=3 to restore from db at startup
This commit is contained in:
parent
6fabed92f2
commit
feef3ce808
2 changed files with 22 additions and 9 deletions
|
@ -38,6 +38,7 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
|||
bool prompt_session_restore = false;
|
||||
bool check_upgrade = true;
|
||||
bool auto_restore_missing_windows = false;
|
||||
bool auto_restore_from_db_at_startup = false;
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
|
@ -103,8 +104,12 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
|||
case "-auto_restore_missing_windows=1":
|
||||
auto_restore_missing_windows = true;
|
||||
break;
|
||||
case "-auto_restore_missing_windows=0":
|
||||
auto_restore_missing_windows = false;
|
||||
case "-auto_restore_missing_windows=2":
|
||||
auto_restore_from_db_at_startup = true;
|
||||
break;
|
||||
case "-auto_restore_missing_windows=3":
|
||||
auto_restore_from_db_at_startup = true;
|
||||
auto_restore_missing_windows = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +183,7 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
|||
pwp.promptSessionRestore = prompt_session_restore;
|
||||
pwp.autoRestoreMissingWindows = auto_restore_missing_windows;
|
||||
|
||||
if (!pwp.Start())
|
||||
if (!pwp.Start(auto_restore_from_db_at_startup))
|
||||
{
|
||||
systrayForm.notifyIconMain.Visible = false;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue