From afca405892ace809c498c010a2d4484bec5adf11 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 24 Apr 2019 14:01:40 +0300 Subject: Implemented USB adapter finalizer. Added exception logging for USB adapter disconnection error. Added Volume color space icon to PPC. Implemented KeepAlive suppression on StorageAPI. Suppressed KeepAlive when uploading job. Implemented keep alive skipping when arrived responses queue is busy. --- .../ViewModels/MainViewVM.cs | 22 +++++- .../Properties/AssemblyInfo.cs | 2 +- .../Converters/ColorSpaceToImageConverter.cs | 2 + .../Tango.PPC.Jobs/Images/NewJob/volume.png | Bin 0 -> 1857 bytes .../Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj | 5 +- .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 17 +++++ .../PPC/Tango.PPC.UI/Dialogs/ScreenLockView.xaml | 4 +- .../PPCApplication/DefaultPPCApplicationManager.cs | 1 + .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Tango.Core/Threading/ActionTimer.cs | 9 ++- .../ExternalBridge/ExternalBridgeScanner.cs | 2 + .../Tango.Integration/Operation/MachineOperator.cs | 3 + .../Tango.Integration/Storage/StorageManager.cs | 81 ++++++++++++++++++++- .../Adapters/UsbTransportAdapter.cs | 28 ++++++- .../Tango.Transport/TransporterBase.cs | 9 ++- 15 files changed, 169 insertions(+), 18 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4d8ec954e..e03c64a54 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -1307,6 +1307,8 @@ namespace Tango.MachineStudio.Developer.ViewModels /// private async void StartJob(Func resumeFunc = null) { + SettingsManager.Default.Save(); + LogManager.Log(String.Format("Starting job {0}...", ActiveJob.Name)); if (MachineOperator == null || MachineOperator.State != TransportComponentState.Connected) { @@ -1766,6 +1768,11 @@ namespace Tango.MachineStudio.Developer.ViewModels InvalidateRelayCommands(); _disable_gamut_check = false; + + _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; + _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; + + _settings.Save(); }); SegmentsCollectionView = CollectionViewSource.GetDefaultView(ActiveJob.Segments); @@ -2003,6 +2010,11 @@ namespace Tango.MachineStudio.Developer.ViewModels SelectedSegments.ToList().ForEach(x => { + if (ActiveJob.Segments.Count == 1) + { + _notification.ShowInfo("A job must contain at least one segment."); + return; + } ActiveJob.Segments.Remove(x); x.DefferedDelete(_activeJobDbContext); }); @@ -2130,12 +2142,17 @@ namespace Tango.MachineStudio.Developer.ViewModels { if (SelectedBrushStop != null && SelectedSegment != null) { - if (_notification.ShowQuestion("Are you sure you want to delete the selected colors?")) + if (_notification.ShowQuestion("Are you sure you want to delete the selected brush stops?")) { LogManager.Log(String.Format("Removing {0} brush stops...", SelectedBrushStops.Count)); SelectedBrushStops.ToList().ForEach(x => { + if (SelectedSegment.BrushStops.Count == 1) + { + _notification.ShowInfo("A job segment must contain at least one brush stop."); + return; + } SelectedSegment.BrushStops.Remove(x); x.DefferedDelete(_activeJobDbContext); }); @@ -2422,8 +2439,7 @@ namespace Tango.MachineStudio.Developer.ViewModels public override void OnShuttingDown() { - _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; - _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; + } #endregion 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 eff1f2521..e50641d8d 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.11.0")] +[assembly: AssemblyVersion("4.0.12.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs index a74a87d28..c2790ee6d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs @@ -26,6 +26,8 @@ namespace Tango.PPC.Jobs.Converters return ResourceHelper.GetImageFromResources("Images/NewJob/lab.png"); case ColorSpaces.Twine: return ResourceHelper.GetImageFromResources("Images/NewJob/twine.png"); + case ColorSpaces.Volume: + return ResourceHelper.GetImageFromResources("Images/NewJob/volume.png"); default: return ResourceHelper.GetImageFromResources("Images/NewJob/coats.png"); } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png new file mode 100644 index 000000000..434e704ca Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 5b7e97c93..6e61e9330 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -406,10 +406,13 @@ + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index 75c4e9578..0f8434663 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -531,6 +531,23 @@ + + + + + + + + + +