diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-24 19:04:47 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-24 19:04:47 +0200 |
| commit | 40746c60fed9e70f3cb7f6f12f55595a77a1adfa (patch) | |
| tree | 815a77a25888aceed48d15a9ce2f977e0d9ee845 /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | 64b768178dc9e64293a52c1b6d2631709af9502a (diff) | |
| download | Tango-40746c60fed9e70f3cb7f6f12f55595a77a1adfa.tar.gz Tango-40746c60fed9e70f3cb7f6f12f55595a77a1adfa.zip | |
Fixed PPC and Machine Studio issues before next release.
Started working on Advanced Installer libraries.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
7 files changed, 36 insertions, 96 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config index 15a7107bd..ea49af905 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config @@ -11,86 +11,6 @@ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <dependentAssembly> - <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> - </dependentAssembly> </assemblyBinding> </runtime> <entityFramework> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs index 5fc7f00df..e7aff7357 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs @@ -17,7 +17,6 @@ using Tango.PPC.Common.Application; using Tango.PPC.Common.Connection; using Tango.PPC.Common.Connectivity; using Tango.PPC.Common.Notifications; -using Tango.PPC.Common.Scripting; using Tango.Settings; using Tango.WiFi; 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 4b5874907..f7711318f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -161,7 +161,7 @@ namespace Tango.PPC.UI.PPCApplication //Start watchdog _watchdogServer = new WatchDogServer(Application.Current.Dispatcher); -#if RELEASE +#if !DEBUG if (settings.EnableWatchDog) { @@ -381,6 +381,33 @@ namespace Tango.PPC.UI.PPCApplication } /// <summary> + /// Runs the updater utility and exits the application. + /// </summary> + public void UpdateApplication(String updaterPath, String arguments) + { + if (IsShuttingDown) return; + + IsShuttingDown = true; + + try + { + _watchdogServer.Dispose(); + + foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<PPCViewModel>()) + { + vm.OnApplicationShuttingDown(); + } + } + catch { } + + LogManager.Log($"Executing '{updaterPath}' with arguments '{arguments}'..."); + Process.Start(updaterPath, arguments); + + LogManager.Log("Terminating application..."); + Environment.Exit(0); + } + + /// <summary> /// Enteres the application technician mode. /// </summary> public void EnterTechnicianMode() diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index fa54f491e..b7c1f4eff 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("1.0.6.0")] +[assembly: AssemblyVersion("1.0.3.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs index 1bd1e1eea..aca9dbcf7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs @@ -282,13 +282,9 @@ namespace Tango.PPC.UI.ViewModels /// </summary> private void CompleteSetup() { - String updater_exe = Path.Combine(_setup_result.UpdatePackagePath, "Tango.PPC.Updater.exe"); - LogManager.Log("Completing machine setup..."); - LogManager.Log($"Executing '{updater_exe}' with arguments '{PathHelper.GetStartupPath()}'..."); - Process.Start(updater_exe, PathHelper.GetStartupPath()); - LogManager.Log("Terminating application process!"); - _appManager.ShutDown(); + String updater_exe = Path.Combine(_setup_result.UpdatePackagePath, "Tango.PPC.Updater.exe"); + _appManager.UpdateApplication(updater_exe, PathHelper.GetStartupPath()); } /// <summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs index 6046f0300..b5b5f56bc 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -194,7 +194,7 @@ namespace Tango.PPC.UI.ViewModels try { - await MachineUpdateManager.UpdateDB(_db_compare_result); + await MachineUpdateManager.UpdateDB(_db_compare_result, MachineProvider.Machine.SerialNumber); LogManager.Log("Database update completed."); await NavigateTo(MachineUpdateView.UpdateCompletedView); } @@ -213,14 +213,12 @@ namespace Tango.PPC.UI.ViewModels private void CompleteUpdate() { + LogManager.Log("Completing machine update..."); + if (!IsDbUpdate) { String updater_exe = Path.Combine(_update_result.UpdatePackagePath, "Tango.PPC.Updater.exe"); - LogManager.Log("Completing machine setup..."); - LogManager.Log($"Executing '{updater_exe}' with arguments '{PathHelper.GetStartupPath()}'..."); - Process.Start(updater_exe, PathHelper.GetStartupPath()); - LogManager.Log("Terminating application process!"); - ApplicationManager.ShutDown(); + ApplicationManager.UpdateApplication(updater_exe, PathHelper.GetStartupPath()); } else { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> + <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> |
