From 8a249931cbff190c1c86a0b7bddc0b80b74370c2 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 18 Apr 2019 16:49:02 +0300 Subject: Fixed FPGA version length on machine studio. --- .../Views/ConnectedMachineView.xaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml index c323ce0b0..338cb2d22 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml @@ -115,7 +115,14 @@ - + + + + • + • + + + @@ -162,7 +169,14 @@ - + + + + • + • + + + -- cgit v1.3.1 From 9413f43423364fca4ba9cc21af55091c33fbed73 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 23 Apr 2019 18:28:19 +0300 Subject: Added edit option for job upload strategy on Machine Studio about dialog. --- .../MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml index 54a8349e6..bf9a52b98 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml @@ -6,6 +6,7 @@ xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:pmrPrinting="clr-namespace:Tango.PMR.Printing;assembly=Tango.PMR" xmlns:bl="clr-namespace:Tango.BL;assembly=Tango.BL" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" @@ -67,6 +68,11 @@ (Requires restart) + Job Upload Strategy: + + + (Requires restart) + -- cgit v1.3.1 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. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/TCC/TCC.mdf | Bin 8388608 -> 8388608 bytes Software/DB/TCC/TCC_log.ldf | Bin 8388608 -> 8388608 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../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 ++- 21 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/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index b41adb74f..bf9a9caf8 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index 2c244f90c..ddbaac9a2 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/TCC/TCC.mdf b/Software/DB/TCC/TCC.mdf index f5902c028..9a07550ca 100644 Binary files a/Software/DB/TCC/TCC.mdf and b/Software/DB/TCC/TCC.mdf differ diff --git a/Software/DB/TCC/TCC_log.ldf b/Software/DB/TCC/TCC_log.ldf index c47eeefb7..6463bbdf7 100644 Binary files a/Software/DB/TCC/TCC_log.ldf and b/Software/DB/TCC/TCC_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 548dda3df..8a4044ddb 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 550ccbeae..842b98d81 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ 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 @@ + + + + + + + + + + - - - 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 21fcdaa3c..ede1bf828 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 @@ -364,6 +364,14 @@ + + {6b9774f7-960d-438e-ad81-c6b9be328d50} + RealTimeGraphX.WPF + + + {f13a489c-80ee-4cd0-bdd4-92d959215646} + RealTimeGraphX + {bb2abb74-ba58-4812-83aa-ec8171f42df4} Tango.AutoComplete @@ -424,6 +432,10 @@ {5001990f-977b-48ff-b217-0236a5022ad8} Tango.Web + + {f209fae8-73f9-441b-97f4-0844a0279390} + Tango.TCC.BL + {f69da3a8-f823-461e-87cf-a9275abc0b15} Tango.MachineStudio.Dispensers @@ -618,7 +630,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta - + \ No newline at end of file -- cgit v1.3.1 From 4b95b6c19bdf18e50068285b3b0a8a8ab0a7b4ce Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 24 Apr 2019 19:30:23 +0300 Subject: Machine Studio v4.0.13.0 PPC v1.0.11.0 --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../Machine Studio Installer.aip | 225 ++++++++++----------- .../PPC Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../part2/PPC Installer v1.0.31.cab | Bin 36687094 -> 0 bytes .../PPC Installer-cache/part2/output-info.ini | Bin 93030 -> 0 bytes .../Advanced Installer Projects/PPC Installer.aip | 20 +- .../Build/Shortcuts/Machine Studio.lnk | Bin 1518 -> 1518 bytes .../Views/RunningJobView.xaml | 8 +- .../Publish/MachineStudioPublisher.cs | 7 +- .../Properties/AssemblyInfo.cs | 2 +- .../ViewModels/LoggingViewVM.cs | 11 +- .../PPC/Tango.PPC.Common/Publish/PPCPublisher.cs | 1 + .../Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs | 70 +++++++ .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- .../ColorConversion/TangoColorConverter.cs | 2 +- .../Tango.EventsTypesGenerator/Program.cs | 30 ++- 20 files changed, 237 insertions(+), 143 deletions(-) delete mode 100644 Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/PPC Installer v1.0.31.cab delete mode 100644 Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/output-info.ini (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index bf9a9caf8..3bf883629 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index ddbaac9a2..7553d17ca 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 8a4044ddb..bac01cd68 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 842b98d81..3e6d0c7b5 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip index 9fd6e665a..906d1dd2f 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip @@ -15,10 +15,10 @@ - + - + @@ -40,6 +40,7 @@ + @@ -67,17 +68,6 @@ - - - - - - - - - - - @@ -107,15 +97,14 @@ - + - @@ -123,9 +112,7 @@ - - @@ -134,7 +121,6 @@ - @@ -142,11 +128,8 @@ - - - @@ -158,18 +141,13 @@ - - - - - @@ -196,7 +174,6 @@ - @@ -213,23 +190,14 @@ - - - - - - - - - @@ -237,25 +205,19 @@ - - - - - - @@ -280,6 +242,7 @@ + @@ -304,31 +267,67 @@ + + + + + - - - - + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -342,7 +341,7 @@ - + @@ -371,22 +370,7 @@ - - - - - - - - - - - - - - - - + @@ -433,7 +417,6 @@ - @@ -442,7 +425,6 @@ - @@ -456,9 +438,7 @@ - - - + @@ -467,9 +447,7 @@ - - @@ -478,7 +456,6 @@ - @@ -488,11 +465,8 @@ - - - @@ -504,18 +478,13 @@ - - - - - @@ -550,7 +519,6 @@ - @@ -567,24 +535,14 @@ - - - - - - - - - - @@ -592,12 +550,10 @@ - - @@ -606,14 +562,10 @@ - - - - @@ -668,6 +620,9 @@ + + + @@ -737,6 +692,15 @@ + + + + + + + + + @@ -749,35 +713,60 @@ - - - + - - - - - - + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + @@ -793,7 +782,7 @@ - + @@ -869,6 +858,8 @@ + + diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt index a603ff06b..6d87e9201 100644 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt and b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/PPC Installer v1.0.31.cab b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/PPC Installer v1.0.31.cab deleted file mode 100644 index 61adc62b2..000000000 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/PPC Installer v1.0.31.cab and /dev/null differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/output-info.ini b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/output-info.ini deleted file mode 100644 index 45e7484f5..000000000 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/part2/output-info.ini and /dev/null differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index edeedd43d..2db3e60c4 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip @@ -18,10 +18,10 @@ - + - + @@ -154,9 +154,9 @@ - + @@ -178,7 +178,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -359,16 +359,16 @@ - - - - + + + + @@ -420,7 +420,7 @@ - + diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk index e0127e799..8ac27d969 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk and b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index dbe0d835b..d0f0c2af6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -194,7 +194,13 @@ - + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs index fb5fbc27c..92326f26f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs @@ -201,8 +201,10 @@ namespace Tango.MachineStudio.Common.Publish using (ZipFile zip = new ZipFile()) { - zip.AddDirectory(Path.Combine(folder, "x86"), "/x86"); - zip.AddDirectory(Path.Combine(folder, "x64"), "/x64"); + foreach (var directory in Directory.GetDirectories(folder)) + { + zip.AddDirectory(directory, $"/{Path.GetFileName(directory)}"); + } var files = Directory.GetFiles(folder, "*.*", SearchOption.TopDirectoryOnly).ToList(); @@ -219,6 +221,7 @@ namespace Tango.MachineStudio.Common.Publish } }; + zip.ParallelDeflateThreshold = -1; zip.Save(tempFile); } 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 e50641d8d..a1601d9de 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.12.0")] +[assembly: AssemblyVersion("4.0.13.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs index 1f63fcd55..0146f199b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs @@ -62,8 +62,15 @@ namespace Tango.PPC.Technician.ViewModels ApplicationLogsViewSource.Filter = (x) => { - LogItemBase log = x as LogItemBase; - return String.IsNullOrWhiteSpace(Filter) || log.Category.ToString().ToLower().Contains(Filter.ToLower()) || log.Message.ToLower().Contains(Filter.ToLower()); + try + { + LogItemBase log = x as LogItemBase; + return String.IsNullOrWhiteSpace(Filter) || log.Category.ToString().ToLower().Contains(Filter.ToLower()) || log.Message.ToLower().Contains(Filter.ToLower()); + } + catch + { + return false; + } }; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Publish/PPCPublisher.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Publish/PPCPublisher.cs index 7c6113829..5131522e0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Publish/PPCPublisher.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Publish/PPCPublisher.cs @@ -364,6 +364,7 @@ namespace Tango.PPC.Common.Publish } }; + zip.ParallelDeflateThreshold = -1; zip.Save(tempFile); OnPublishProgress(100, 100, "TUP file generated successfully."); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs index 0eb982d08..0bd9f9d1d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs @@ -9,9 +9,12 @@ using System.Threading.Tasks; using System.Windows; using Tango.BL; using Tango.Core; +using Tango.Core.DI; using Tango.Core.Helpers; using Tango.Logging; using Tango.PPC.Common; +using Tango.PPC.Common.EventLogging; +using Tango.PPC.Common.Notifications; using Tango.PPC.Common.WatchDog; using Tango.Settings; @@ -22,6 +25,8 @@ namespace Tango.PPC.UI /// public partial class App : Application { + private WpfGlobalExceptionTrapper exceptionTrapper; + public static String[] StartupArgs { get; private set; } private LogManager LogManager = LogManager.Default; @@ -47,6 +52,10 @@ namespace Tango.PPC.UI base.OnStartup(e); + exceptionTrapper = new WpfGlobalExceptionTrapper(); + exceptionTrapper.Initialize(this); + exceptionTrapper.ApplicationCrashed += ExceptionTrapper_ApplicationCrashed; + LogManager.Categories.Clear(); CoreSettings.DefaultDataSource = new DataSource() @@ -72,5 +81,66 @@ namespace Tango.PPC.UI LogManager.Categories.AddRange(settings.LoggingCategories); } + + #region Global Exception Trapping + + /// + /// Handles the ApplicationCrashed event of the ExceptionTrapper. + /// + /// The source of the event. + /// The instance containing the event data. + private void ExceptionTrapper_ApplicationCrashed(object sender, ApplicationCrashedEventArgs e) + { + e.TryRecover = true; + + try + { + LogManager.Log(e.Exception, "Application Crashed!"); + LogManager.Log("Trying to recover from application crash..."); + + try + { + if (Application.Current == null) + { + new Application { ShutdownMode = ShutdownMode.OnExplicitShutdown }; + } + } + catch { } + + try + { + var eventLogger = TangoIOC.Default.GetInstance(); + if (eventLogger != null) + { + eventLogger.Log(e.Exception, "Application Crashed!"); + } + } + catch { } + + Application.Current.Dispatcher.Invoke(async () => + { + try + { + LogManager.Log("Trying to notify the user about the crash..."); + INotificationProvider notificationProvider = TangoIOC.Default.GetInstance(); + + if (notificationProvider != null) + { + await notificationProvider.ShowError("An unexpected error has occurred. Use the application logs to diagnose and report the problem."); + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error using the notification provider."); + } + }); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error in global exception trapper!"); + } + } + + #endregion } } 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 1f4f36e0b..6244f13fb 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.10.0")] +[assembly: AssemblyVersion("1.0.11.0")] 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. --> - + diff --git a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs index 8ab0bf3a7..2a2533ee6 100644 --- a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs +++ b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs @@ -217,7 +217,7 @@ namespace Tango.BL.ColorConversion conversionInput.ColorSpace = (PMR.ColorLab.ColorSpace)brushStop.ColorSpace.Code; - if (conversionInput.ColorSpace == PMR.ColorLab.ColorSpace.Twine || conversionInput.ColorSpace == PMR.ColorLab.ColorSpace.Panton) + if (conversionInput.ColorSpace == PMR.ColorLab.ColorSpace.Twine || conversionInput.ColorSpace == PMR.ColorLab.ColorSpace.Coats) { conversionInput.ColorSpace = PMR.ColorLab.ColorSpace.Volume; diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs index f69281e94..21887a9f7 100644 --- a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs @@ -46,16 +46,28 @@ namespace Tango.EventsTypesGenerator using (ObservablesContext db = ObservablesContext.CreateDefault()) { - Console.WriteLine("Clearing all event types..."); - db.Database.ExecuteSqlCommand("DELETE FROM EVENT_TYPES"); - - Console.WriteLine("Inserting new events..."); + //Console.WriteLine("Clearing all event types..."); + //db.Database.ExecuteSqlCommand("DELETE FROM EVENT_TYPES"); foreach (var evType in results) { - Console.WriteLine("Inserting " + evType.ToString()); + bool isNewEvent = false; + + int code = int.Parse(evType.Code); + + EventType newEvent = db.EventTypes.SingleOrDefault(x => x.Code == code); + + if (newEvent == null) + { + Console.WriteLine("Inserting " + evType.ToString()); + newEvent = new EventType(); + isNewEvent = true; + } + else + { + Console.WriteLine("Updating " + evType.ToString()); + } - EventType newEvent = new EventType(); newEvent.Code = int.Parse(evType.Code); newEvent.Name = evType.Name; newEvent.Title = evType.Title; @@ -88,7 +100,11 @@ namespace Tango.EventsTypesGenerator } newEvent.RequiresUserIntervention = evType.UserInterventionRequired == "Yes"; - db.EventTypes.Add(newEvent); + + if (isNewEvent) + { + db.EventTypes.Add(newEvent); + } } -- cgit v1.3.1