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. --- .../MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties') 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 -- 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/Properties') 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