diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 6b566dcd2..c5dab127c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -63,6 +63,11 @@ namespace Tango.PPC.UI.PPCApplication public event EventHandler SetupRequired; /// <summary> + /// Occurs when firmware upgrade is required. + /// </summary> + public event EventHandler FirmwareUpgradeRequired; + + /// <summary> /// Occurs when the main window content has been rendered. /// </summary> public event EventHandler ContentRendered; @@ -159,7 +164,7 @@ namespace Tango.PPC.UI.PPCApplication if (App.StartupArgs.Contains("-update_ok")) { LogManager.Log("Application started with '-update_ok' startup arguments. The application has been successfully updated."); - settings.ApplicationState = ApplicationStates.Ready; + settings.ApplicationState = ApplicationStates.FirmwareUpgrade; settings.Save(); } @@ -191,6 +196,11 @@ namespace Tango.PPC.UI.PPCApplication LogManager.Log($"The application is in {settings.ApplicationState} state. database initialization skipped. Invoking setup required event!"); SetupRequired?.Invoke(this, new EventArgs()); } + else if (settings.ApplicationState == ApplicationStates.FirmwareUpgrade) + { + LogManager.Log($"The application is in {settings.ApplicationState} state. database initialization skipped. Invoking firmware upgrade required event!"); + FirmwareUpgradeRequired?.Invoke(this, new EventArgs()); + } else { PostDbInitialize(); |
