From fadf83a50071ffba21db05eceff10c51c18f5fb3 Mon Sep 17 00:00:00 2001 From: Roy Date: Fri, 23 Feb 2018 12:03:18 +0200 Subject: Machine Studio Update & Publish. Improved user roles & permissions structure. Added permission for version publish. --- .../Tango.MachineStudio.Publisher/MainWindowVM.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs index 2ceb36994..34d2f1b1f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using System.Windows; using Tango.Core.Commands; using Tango.Core.Cryptography; +using Tango.Core.Helpers; using Tango.MachineStudio.Common.Update; using Tango.Settings; using Tango.SharedUI; @@ -121,6 +122,7 @@ namespace Tango.MachineStudio.Publisher Task.Factory.StartNew(() => { IsUpdating = true; + String tempFile = String.Empty; try { @@ -132,7 +134,7 @@ namespace Tango.MachineStudio.Publisher Comments = Comments, }); - String tempFile = Path.Combine(Path.GetTempPath(), response.FileName); + tempFile = Path.Combine(Path.GetTempPath(), response.FileName); using (ZipFile zip = new ZipFile()) { @@ -174,6 +176,11 @@ namespace Tango.MachineStudio.Publisher } } + _client.NotifyUploadCompleted(new UploadCompletedRequest() + { + Token = response.Token, + }); + UpdateVersions(); } catch (Exception ex) @@ -183,6 +190,7 @@ namespace Tango.MachineStudio.Publisher finally { IsUpdating = false; + PathHelper.TryDeleteFile(tempFile); } }); } -- cgit v1.3.1