diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-13 20:02:59 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-13 20:02:59 +0200 |
| commit | 69c55f54ee7217f16419049a311ce437d3c19157 (patch) | |
| tree | 2c0c25115e07ad4eba5dd4bb4c150fe6d1f0c702 /Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication | |
| parent | 7b371c15dfb48c5182bbb704b5ea1ff1385b1d30 (diff) | |
| download | Tango-69c55f54ee7217f16419049a311ce437d3c19157.tar.gz Tango-69c55f54ee7217f16419049a311ce437d3c19157.zip | |
Fixed issue with PPC WIFI connection profiles.
Implemented OS restart after first setup.
Prevented PPC updater crashes without restarting PPC.
Implemented restarting system view on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | 19 |
1 files changed, 19 insertions, 0 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 2929908cc..39ce8cd30 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -46,6 +46,11 @@ namespace Tango.PPC.UI.PPCApplication private INotificationProvider _notificationProvider; /// <summary> + /// Occurs when a system restart is required. + /// </summary> + public event EventHandler SystemRestartRequired; + + /// <summary> /// Occurs when the application has started. /// </summary> public event EventHandler ApplicationStarted; @@ -141,6 +146,7 @@ namespace Tango.PPC.UI.PPCApplication PPCSettings settings = null; bool initialized = false; + bool isAfterSetup = false; await Task.Factory.StartNew(() => { @@ -163,8 +169,21 @@ 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."); + + if (settings.ApplicationState == ApplicationStates.PreSetup) + { + isAfterSetup = true; + LogManager.Log("System restart is required."); + } + settings.ApplicationState = ApplicationStates.Ready; settings.Save(); + + if (isAfterSetup) + { + SystemRestartRequired?.Invoke(this, new EventArgs()); + return; + } } if (settings.ApplicationState == ApplicationStates.Ready) |
