aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-13 20:02:59 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-13 20:02:59 +0200
commit69c55f54ee7217f16419049a311ce437d3c19157 (patch)
tree2c0c25115e07ad4eba5dd4bb4c150fe6d1f0c702 /Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
parent7b371c15dfb48c5182bbb704b5ea1ff1385b1d30 (diff)
downloadTango-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.Common/OS/DefaultOperationSystemManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
index a073c1c5e..75e8d40dc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
@@ -10,6 +10,7 @@ using Tango.PPC.Common.Scripting;
namespace Tango.PPC.Common.OS
{
using System.Collections.ObjectModel;
+ using System.Diagnostics;
using Tango.Core;
using SLID = Guid; //SLID id declaration as typedef GUID SLID; in slpublic.h
@@ -124,5 +125,14 @@ namespace Tango.PPC.Common.OS
CmdCommand cmd = new CmdCommand("tzutil", $"/s \"{timeZone.Id}\"");
await cmd.Run();
}
+
+ /// <summary>
+ /// Restarts the system.
+ /// </summary>
+ /// <returns></returns>
+ public void Restart()
+ {
+ Process.Start("shutdown.exe", "-r -t 0");
+ }
}
}