From 88f609c6244121f07b45e8101174fdc293bbcb2d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 27 Oct 2019 13:19:32 +0200 Subject: Removed rollback version in machine studio. Omitted remove old dll files from machine studio updater. Removed ColorCapture module from MS update to reduce package size. Added ColorCapture module only to MS installer. Added ExternalBridge default timeout to machine studio settings file. --- .../Tango.MachineStudio.ColorCapture.csproj | 4 +- .../MachineStudioSettings.cs | 6 ++ .../Properties/AssemblyInfo.cs | 2 +- .../Tango.MachineStudio.UI.csproj | 10 +-- .../ViewModels/MainViewVM.cs | 1 + .../ViewModels/UpdateViewVM.cs | 76 +++++++++++----------- .../Tango.MachineStudio.UI/Views/UpdateView.xaml | 8 +-- .../Tango.MachineStudio.Updater/MainWindow.xaml.cs | 34 +++++----- 8 files changed, 70 insertions(+), 71 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj index 8f37a9c2d..4e6feceb5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj @@ -18,7 +18,7 @@ true full false - ..\..\..\Build\Machine Studio\Debug\ + bin\Debug\ DEBUG;TRACE prompt 4 @@ -26,7 +26,7 @@ pdbonly true - ..\..\..\Build\Machine Studio\Release\ + bin\Release\ TRACE prompt 4 diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index 781e034e8..c307a8e33 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -129,6 +129,11 @@ namespace Tango.MachineStudio.Common /// public TimeSpan MaximumCacheTime { get; set; } + /// + /// Gets or sets the external bridge request timeout. + /// + public TimeSpan ExternalBridgeRequestTimeout { get; set; } + /// /// Gets the machine service address. /// @@ -167,6 +172,7 @@ namespace Tango.MachineStudio.Common CachingMode = ObservablesContextInMemoryCachingMode.None; Theme = MachineStudioTheme.Light; JobUnitsMethod = JobUnitsMethods.Operator; + ExternalBridgeRequestTimeout = TimeSpan.FromSeconds(5); } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index 91792e0f3..c268cb607 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("4.0.29.0")] +[assembly: AssemblyVersion("4.0.30.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index e172bbc91..b542821d7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -440,10 +440,6 @@ {5001990f-977b-48ff-b217-0236a5022ad8} Tango.Web - - {f209fae8-73f9-441b-97f4-0844a0279390} - Tango.TCC.BL - {f69da3a8-f823-461e-87cf-a9275abc0b15} Tango.MachineStudio.Dispensers @@ -452,10 +448,6 @@ {7d0fce3c-9a37-439c-9f9f-b26cfd6a8a33} Tango.MachineStudio.Catalogs - - {1b87ca53-50bd-4c48-a8c7-fbb9f1419aff} - Tango.MachineStudio.ColorCapture - {4d183aca-552b-4135-ae81-7c5a8e5fc3b1} Tango.MachineStudio.ColorLab @@ -649,7 +641,7 @@ if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)ProtoCompilers\" - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index b22d65192..90fe25c8f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -459,6 +459,7 @@ namespace Tango.MachineStudio.UI.ViewModels if (x.SelectedMachine is ExternalBridgeTcpClient) { x.SelectedMachine.As().EnableApplicationLogs = x.EnableApplicationLogs; + x.SelectedMachine.RequestTimeout = _settings.ExternalBridgeRequestTimeout; } if (x.SelectedMachine.RequiresAuthentication) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs index 4a94322fb..2ee8574b1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs @@ -173,7 +173,7 @@ namespace Tango.MachineStudio.UI.ViewModels DownloadLatestVersionResponse response = await _machineStudioWebClient.DownloadLatestVersion(new DownloadLatestVersionRequest() { - + }); _updateInfo = new CheckForUpdatesResponse(); @@ -272,7 +272,7 @@ namespace Tango.MachineStudio.UI.ViewModels using (StorageBlobDownloader downloader = new StorageBlobDownloader(_updateInfo.BlobAddress, tempFile.Path)) { - downloader.Progress += (x, e) => + downloader.Progress += (x, e) => { InvokeUINow(() => { @@ -326,40 +326,40 @@ namespace Tango.MachineStudio.UI.ViewModels } } - try - { - LogManager.Log("Backing up current version..."); - CurrentUpdateFile = "Backing up current version..."; - - String rollbackFolder = GetRollbackFolder(); - Directory.CreateDirectory(rollbackFolder); - - String backFile = GetRollbackFile(); - - if (File.Exists(backFile)) - { - File.Delete(backFile); - } - - using (ZipFile backZip = new ZipFile(backFile)) - { - int currentEntry = 0; - - backZip.SaveProgress += (_, e) => - { - UpdateProgress = ((double)(currentEntry++) / (double)backZip.Entries.Count) * 100d; - }; - - backZip.Password = "Aa123456"; - backZip.AddDirectory(_appPath); - backZip.Save(); - } - } - catch (Exception ex) - { - LogManager.Log(ex, "Could not construct rollback."); - _notification.ShowWarning("Update center has failed to construct a rollback point for the current version. Version rollback will not be available."); - } + //try + //{ + // LogManager.Log("Backing up current version..."); + // CurrentUpdateFile = "Backing up current version..."; + + // String rollbackFolder = GetRollbackFolder(); + // Directory.CreateDirectory(rollbackFolder); + + // String backFile = GetRollbackFile(); + + // if (File.Exists(backFile)) + // { + // File.Delete(backFile); + // } + + // using (ZipFile backZip = new ZipFile(backFile)) + // { + // int currentEntry = 0; + + // backZip.SaveProgress += (_, e) => + // { + // UpdateProgress = ((double)(currentEntry++) / (double)backZip.Entries.Count) * 100d; + // }; + + // backZip.Password = "Aa123456"; + // backZip.AddDirectory(_appPath); + // backZip.Save(); + // } + //} + //catch (Exception ex) + //{ + // LogManager.Log(ex, "Could not construct rollback."); + // _notification.ShowWarning("Update center has failed to construct a rollback point for the current version. Version rollback will not be available."); + //} TangoIOC.Default.GetInstance().DisableCheckForUpdates = true; Status = UpdateStatus.UpdateCompleted; @@ -385,8 +385,8 @@ namespace Tango.MachineStudio.UI.ViewModels { try { - LogManager.Log("Clearing EF model store..."); - ObservablesContext.ClearModelStore(); + //LogManager.Log("Clearing EF model store..."); + //ObservablesContext.ClearModelStore(); Process p = new Process(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml index a35928e12..924db7f8b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml @@ -109,12 +109,12 @@ -