From 32304a49a0fd711149e8f7f08ac2fc5991387170 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 5 Mar 2020 10:42:32 +0200 Subject: Fixed and improved issue with TFP package validation. --- .../VersionPackageDescriptorExtensions.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs index 78b179736..766b03270 100644 --- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs +++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs @@ -25,20 +25,21 @@ public static class VersionPackageDescriptorExtensions throw new InvalidDataException("TFP package contains multiple MCU files."); } - var mcuFile = descriptor.FileDescriptors.SingleOrDefault(x => x.Destination == VersionFileDestination.Mcu); - - if (String.IsNullOrWhiteSpace(mcuFile.Version)) + if (descriptor.FileDescriptors.GroupBy(x => x.FileName).Any(x => x.Count() > 1)) { - throw new InvalidDataException("TFP package MCU does specify any version."); + throw new InvalidDataException("The TPF package cannot contain duplicate file names."); } - try - { - Version.Parse(mcuFile.Version); - } - catch + foreach (var item in descriptor.FileDescriptors) { - throw new InvalidDataException($"TFP package MCU version '{mcuFile.Version}' is invalid."); + try + { + Version.Parse(item.Version); + } + catch + { + throw new InvalidDataException($"Invalid version ({item.Version}) for file '{item.FileName}'."); + } } } -- cgit v1.3.1 From 1834b13df30bcf71aab363f9e504c4e79b3f2224 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 5 Mar 2020 16:10:17 +0200 Subject: Machine Studio. Fixed lubricant 0 Volume when change to RGB mode. --- .../ViewModels/MainViewVM.cs | 17 ++++++ .../Views/JobView.xaml | 2 +- .../Views/JobView.xaml.cs | 5 ++ .../Converters/DateTimeToStringFormatConverter.cs | 10 +-- .../Models/JobRunModel.cs | 2 + .../ViewModels/JobRunsViewVM.cs | 5 +- .../Views/JobRunsView.xaml | 7 ++- .../Tango.Integration/Operation/MachineOperator.cs | 21 +++++++ Software/Visual_Studio/Tango.sln | 55 +++++++++++++++-- .../Utilities/Tango.CctOptimizer.CLI/App.config | 28 +++++++++ .../Utilities/Tango.CctOptimizer.CLI/Program.cs | 36 +++++++++++ .../Properties/AssemblyInfo.cs | 36 +++++++++++ .../Tango.CctOptimizer.CLI.csproj | 71 ++++++++++++++++++++++ .../Tango.CctOptimizer.CLI/packages.config | 4 ++ 14 files changed, 283 insertions(+), 16 deletions(-) create mode 100644 Software/Visual_Studio/Utilities/Tango.CctOptimizer.CLI/App.config create mode 100644 Software/Visual_Studio/Utilities/Tango.CctOptimizer.CLI/Program.cs create mode 100644 Software/Visual_Studio/Utilities/Tango.CctOptimizer.CLI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/Utilities/Tango.CctOptimizer.CLI/Tango.CctOptimizer.CLI.csproj create mode 100644 Software/Visual_Studio/Utilities/Tango.CctOptimizer.CLI/packages.config (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 c5df65f59..9f0ea3423 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 @@ -1681,6 +1681,23 @@ namespace Tango.MachineStudio.Developer.ViewModels #endregion + #region Color Space + + public void OnBrushStopColorSpaceChanged(BrushStop stop) + { + if (stop != null && stop.ColorSpace != null && stop.BrushColorSpace != BL.Enumerations.ColorSpaces.Volume) + { + var lubricant = stop.LiquidVolumes.SingleOrDefault(x => x.LiquidType == LiquidTypes.Lubricant); + + if (lubricant != null) + { + lubricant.Volume = 100; + } + } + } + + #endregion + #region Process Parameters Management /// diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 59ad6341d..ed8fc57fe 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -976,7 +976,7 @@ Color Space - + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs index aeb349bdc..8d221c3f3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs @@ -11,6 +11,7 @@ using Tango.Integration.Operation; using Tango.Logging; using Tango.PMR.MachineStatus; using Tango.PPC.Common; +using Tango.PPC.Maintenance.Commands; using Tango.PPC.Maintenance.Helpers; using Tango.PPC.Maintenance.Models; using Tango.PPC.Maintenance.Views; @@ -38,11 +39,15 @@ namespace Tango.PPC.Maintenance.ViewModels set { _overallTemperature = value; RaisePropertyChangedAuto(); } } - public RelayCommand OpenDyeingHeadCommand { get; set; } + public RelayCommand ExportLogsCommand { get; set; } - public RelayCommand CloseDyeingHeadCommand { get; set; } + public OpenCloseDyeingHeadCommand OpenCloseDyeingHeadCommand { get; set; } - public RelayCommand ExportLogsCommand { get; set; } + public OpenCloseLeftLeadingWheelsCommand OpenCloseLeftLeadingWheelsCommand { get; set; } + + public OpenCloseRightLeadingWheelsCommand OpenCloseRightLeadingWheelsCommand { get; set; } + + public ResetThreadLoadingCommand ResetThreadLoadingCommand { get; set; } public MaintenanceViewVM() { @@ -50,10 +55,12 @@ namespace Tango.PPC.Maintenance.ViewModels OverallTemperature = new OverallTemperatureModel(); OpenGuideCommand = new RelayCommand(OpenGuide); - - OpenDyeingHeadCommand = new RelayCommand(OpenDyeingHead); - CloseDyeingHeadCommand = new RelayCommand(CloseDyeingHead); ExportLogsCommand = new RelayCommand(ExportLogsToStorage); + + OpenCloseDyeingHeadCommand = new OpenCloseDyeingHeadCommand(); + OpenCloseLeftLeadingWheelsCommand = new OpenCloseLeftLeadingWheelsCommand(); + OpenCloseRightLeadingWheelsCommand = new OpenCloseRightLeadingWheelsCommand(); + ResetThreadLoadingCommand = new ResetThreadLoadingCommand(); } public override void OnApplicationStarted() @@ -101,86 +108,6 @@ namespace Tango.PPC.Maintenance.ViewModels } } - private void OpenDyeingHead() - { - IsFree = false; - - try - { - NotificationProvider.SetGlobalBusyMessage("Opening dyeing head lead..."); - - MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest() - { - Direction = PMR.Diagnostics.MotorDirection.Backward, - MotorType = PMR.Hardware.HardwareMotorType.MotoDhLid, - Speed = 400, - }).Subscribe((response) => - { - //Next - }, (ex) => - { - //Error - IsFree = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, "Error opening dyeing head lead."); - NotificationProvider.ShowError(ex.FlattenMessage()); - }, () => - { - //Complete - IsFree = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowSuccess("The dyeing head lead is now opened."); - }); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error opening dyeing head lead."); - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowError(ex.FlattenMessage()); - IsFree = true; - } - } - - private void CloseDyeingHead() - { - IsFree = false; - - try - { - NotificationProvider.SetGlobalBusyMessage("Closing dyeing head lead..."); - - MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest() - { - Direction = PMR.Diagnostics.MotorDirection.Forward, - MotorType = PMR.Hardware.HardwareMotorType.MotoDhLid, - Speed = 400, - }).Subscribe((response) => - { - //Next - }, (ex) => - { - //Error - IsFree = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, "Error closing dyeing head lead."); - NotificationProvider.ShowError(ex.FlattenMessage()); - }, () => - { - //Complete - IsFree = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowSuccess("The dyeing head lead is now closed."); - }); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error closing dyeing head lead."); - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowError(ex.FlattenMessage()); - IsFree = true; - } - } - private async void ExportLogsToStorage() { var result = await NavigationManager. diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml index dbe09ca19..538d4e96d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml @@ -5,8 +5,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels" xmlns:global="clr-namespace:Tango.PPC.Maintenance" + xmlns:arr="clr-namespace:System.Collections;assembly=mscorlib" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:localConverters="clr-namespace:Tango.PPC.Maintenance.Converters" + xmlns:localControls="clr-namespace:Tango.PPC.Maintenance.Controls" xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MaintenanceViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MaintenanceViewVM}"> @@ -171,10 +173,24 @@ - - OPEN DYEING HEAD LEAD + - CLOSE DYEING HEAD LEAD + + + + + + + + + + + + + + + + RESET THREAD LOADING EXPORT SYSTEM LOGS -- cgit v1.3.1 From 2009e374e82aa54c122d10f3c00a7defddab3a4c Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 5 Mar 2020 18:31:05 +0200 Subject: Fixed issue with job mixing. Fixed issue with LogViewer scroll and session logs. --- Software/DB/Scripts/Select With Local Datetime.sql | 2 + .../Machine Studio Installer.aip | 9 ++-- .../PPC Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../Advanced Installer Projects/PPC Installer.aip | 46 +++++++++++++++++++-- .../Properties/AssemblyInfo.cs | 2 +- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Tango.Integration/Operation/MachineOperator.cs | 24 +++++++++++ .../Tango.RemoteDesktop/Tango.RemoteDesktop.csproj | 1 + .../Tango.LogViewer.UI/LogViewerManager.cs | 2 +- .../Utilities/Tango.LogViewer.UI/MainWindow.xaml | 4 +- 10 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 Software/DB/Scripts/Select With Local Datetime.sql (limited to 'Software/Visual_Studio') diff --git a/Software/DB/Scripts/Select With Local Datetime.sql b/Software/DB/Scripts/Select With Local Datetime.sql new file mode 100644 index 000000000..f0c22ea91 --- /dev/null +++ b/Software/DB/Scripts/Select With Local Datetime.sql @@ -0,0 +1,2 @@ +SELECT CONVERT(datetime, SWITCHOFFSET(START_DATE, DATEPART(TZOFFSET, +START_DATE AT TIME ZONE 'Israel Standard Time'))) as LOCAL_TIME, * FROM JOB_RUNS ORDER BY START_DATE DESC \ No newline at end of file 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 a1d8353fe..29f744ef6 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip @@ -16,10 +16,10 @@ - + - + @@ -360,6 +360,7 @@ + @@ -799,6 +800,7 @@ + @@ -810,7 +812,7 @@ - + @@ -1272,6 +1274,7 @@ + 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 993ced97e..a603ff06b 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.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index e3bea2a1b..4abc93ae4 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 @@ - + - + @@ -45,6 +45,8 @@ + + @@ -106,6 +108,7 @@ + @@ -118,6 +121,10 @@ + + + + @@ -172,6 +179,7 @@ + @@ -182,8 +190,14 @@ + + + + + + @@ -409,6 +423,20 @@ + + + + + + + + + + + + + + @@ -418,7 +446,7 @@ - + @@ -660,6 +688,18 @@ + + + + + + + + + + + + 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 9f7d786bc..edf619f2f 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.1.2.0")] +[assembly: AssemblyVersion("4.1.4.0")] [assembly: ComVisible(false)] \ No newline at end of file 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 01ccc7654..11a400fd3 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.1.5.0")] +[assembly: AssemblyVersion("1.1.6.0")] diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 96c8e5ccf..9768498c6 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -2354,6 +2354,12 @@ namespace Tango.Integration.Operation ThreadFactory.StartNew(async () => { + if (handler.IsCanceled) + { + Status = MachineStatuses.ReadyToDye; + return; + } + Status = MachineStatuses.GettingReady; RunningJob = clonedJob; OnPrintingStarted(handler, clonedJob); @@ -2429,6 +2435,12 @@ namespace Tango.Integration.Operation LogManager.Log($"Job upload method is set to {JobUploadStrategy}..."); + if (handler.IsCanceled) + { + Status = MachineStatuses.ReadyToDye; + return; + } + var oldKeepAlive = UseKeepAlive; if (JobUploadStrategy == JobUploadStrategy.JobDescriptionFile) @@ -2449,9 +2461,21 @@ namespace Tango.Integration.Operation Message = "Uploading job description file...", }); + if (handler.IsCanceled) + { + Status = MachineStatuses.ReadyToDye; + return; + } + LogManager.Log("Creating storage API manager..."); var storage = CreateStorageManager(); + if (handler.IsCanceled) + { + Status = MachineStatuses.ReadyToDye; + return; + } + //Suppress keep alive while job uploads. //storage.SuppressKeepAliveWhileFileUploads = true; UseKeepAlive = false; //This is a work around for Shlomo not managing to keep alive while parsing the file. diff --git a/Software/Visual_Studio/Tango.RemoteDesktop/Tango.RemoteDesktop.csproj b/Software/Visual_Studio/Tango.RemoteDesktop/Tango.RemoteDesktop.csproj index dfffe90ec..2aad073cb 100644 --- a/Software/Visual_Studio/Tango.RemoteDesktop/Tango.RemoteDesktop.csproj +++ b/Software/Visual_Studio/Tango.RemoteDesktop/Tango.RemoteDesktop.csproj @@ -30,6 +30,7 @@ TRACE prompt 4 + true diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs index 9c385b387..3615eb50a 100644 --- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs +++ b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs @@ -64,7 +64,7 @@ namespace Tango.LogViewer.UI logfileName = logfileName.Substring(0, indexPos); } - String dateString = System.IO.Path.GetFileNameWithoutExtension(filePath).Replace($"{fileName}-", ""); + String dateString = System.IO.Path.GetFileNameWithoutExtension(filePath).Replace($"{fileName}-", "").Replace("_session", ""); indexPos = dateString.IndexOf(FileLogger.FILE_SET_EXTENSION); int indexOfFile = 0; CountOfSet = 0; diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml index 952fb853b..f1c947402 100644 --- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml +++ b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml @@ -219,7 +219,7 @@ -