From 90287baf32ed1fe6bbca479cf679e3f76bfcebe2 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 16 May 2019 15:25:47 +0300 Subject: Versions updates. --- .../MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') 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 3cf0dce1a..13e2af128 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.20.0")] +[assembly: AssemblyVersion("4.0.21.0")] [assembly: ComVisible(false)] \ No newline at end of file -- cgit v1.3.1 From 2433051636406054c69b6de42806aab50e076e01 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 19 May 2019 12:37:00 +0300 Subject: 2. Update PPC DB Schema and Liquid Types. *** 3. Test preferred index on PPC. *** 3.1. Add Has_Pigment to Liquid Type. *** 4. Add "Use Preferred Index to Machine Studio. *** 4. Enable KeepAlive by default. *** 4. Disable upload HW for TCP by default. *** --- 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 .../DeveloperModuleSettings.cs | 10 ++ .../Views/JobView.xaml | 54 ++++++-- .../ViewModels/MachineConnectionViewVM.cs | 22 +++- .../ViewModels/MainViewVM.cs | 13 +- .../Views/MachineConnectionView.xaml | 7 +- .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 15 +-- .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- .../Tango.BL/DTO/LiquidTypeDTOBase.cs | 8 ++ .../Visual_Studio/Tango.BL/Entities/BrushStop.cs | 15 ++- .../Tango.BL/Entities/LiquidTypeBase.cs | 38 ++++++ .../Tango.DAL.Remote/DB/LIQUID_TYPES.cs | 1 + .../Tango.DAL.Remote/DB/RemoteADO.Designer.cs | 2 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 3 + .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 140 ++++++++++----------- .../Tango.Emulations/Emulators/MachineEmulator.cs | 7 +- .../Visual_Studio/Tango.Settings/SettingsBase.cs | 27 +++- .../Tango.Transport/TransporterBase.cs | 7 +- 21 files changed, 259 insertions(+), 112 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 6c1b6442c..84996196b 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 456842cad..0239349e0 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 a6f55eab7..cd64cd72d 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 49578448d..6f806966f 100644 Binary files a/Software/DB/TCC/TCC_log.ldf and b/Software/DB/TCC/TCC_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs index 2099b12d9..3d0ee2461 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs @@ -34,6 +34,16 @@ namespace Tango.MachineStudio.Developer /// public int GradientResolutionCM { get; set; } + private bool _usePreferredLiquidVolumeIndex; + /// + /// Gets or sets a value indicating whether to use the preferred liquid volume index. + /// + public bool UsePreferredLiquidVolumeIndex + { + get { return _usePreferredLiquidVolumeIndex; } + set { _usePreferredLiquidVolumeIndex = value; RaisePropertyChangedAuto(); } + } + public DeveloperModuleSettings() { ProcessParametersIndices = new List(); 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 8a5ec94fa..95f88d1ea 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 @@ -28,7 +28,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views" mc:Ignorable="d" - d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}" x:Name="control"> @@ -249,7 +249,17 @@ - + + + + @@ -785,16 +795,16 @@ - + - SUPPORTED MEDIA LIQUID ( Max Nanolitter/CM ) + SUPPORTED MEDIA LIQUID ( Max Nanolitter/CM ) - + - + @@ -821,12 +831,20 @@ - + + @@ -1030,7 +1048,17 @@ - + + + + - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 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/DTO/LiquidTypeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs index a37aba14f..6b24599d9 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs @@ -61,5 +61,13 @@ namespace Tango.BL.DTO get; set; } + /// + /// has pigment + /// + public Boolean HasPigment + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs index 8cabcd138..f04ac51dc 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs @@ -78,11 +78,11 @@ namespace Tango.BL.Entities public ObservableCollection LiquidVolumes { get { return _liquidVolumes; } - set { _liquidVolumes = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(LiquidVolumesOrdered)); } + set { _liquidVolumes = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(LiquidVolumesOrdered)); RaisePropertyChanged(nameof(LiquidVolumesOrderedPigmented)); } } /// - /// Gets the collection of liquid volumes ordered by their liquid type preffered index. + /// Gets the collection of liquid volumes ordered by their liquid type preferred index. /// [NotMapped] [JsonIgnore] @@ -91,6 +91,16 @@ namespace Tango.BL.Entities get { return LiquidVolumes != null ? LiquidVolumes.OrderBy(x => x.IdsPack.LiquidType.PreferredIndex).ToObservableCollection() : null; } } + /// + /// Gets the collection of liquid volumes with pigmented liquid types ordered by their liquid type preferred index. + /// + [NotMapped] + [JsonIgnore] + public ObservableCollection LiquidVolumesOrderedPigmented + { + get { return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.LiquidType.HasPigment).OrderBy(x => x.IdsPack.LiquidType.PreferredIndex).ToObservableCollection() : null; } + } + /// /// Gets or sets the brush stop color. /// @@ -315,6 +325,7 @@ namespace Tango.BL.Entities } RaisePropertyChanged(nameof(LiquidVolumesOrdered)); + RaisePropertyChanged(nameof(LiquidVolumesOrderedPigmented)); } private void LiquidVolume_VolumeChanged() diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs index 33507102c..7076c5485 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs @@ -35,6 +35,8 @@ namespace Tango.BL.Entities public event EventHandler PreferredIndexChanged; + public event EventHandler HasPigmentChanged; + public event EventHandler> CatsChanged; public event EventHandler> IdsPacksChanged; @@ -176,6 +178,33 @@ namespace Tango.BL.Entities } } + protected Boolean _haspigment; + + /// + /// Gets or sets the liquidtypebase has pigment. + /// + + [Column("HAS_PIGMENT")] + + public Boolean HasPigment + { + get + { + return _haspigment; + } + + set + { + if (_haspigment != value) + { + _haspigment = value; + + OnHasPigmentChanged(value); + + } + } + } + protected SynchronizedObservableCollection _cats; /// @@ -296,6 +325,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(PreferredIndex)); } + /// + /// Called when the HasPigment has changed. + /// + protected virtual void OnHasPigmentChanged(Boolean haspigment) + { + HasPigmentChanged?.Invoke(this, haspigment); + RaisePropertyChanged(nameof(HasPigment)); + } + /// /// Called when the Cats has changed. /// diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs index d3e322220..1ace97bf4 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs @@ -30,6 +30,7 @@ namespace Tango.DAL.Remote.DB public double VERSION { get; set; } public int COLOR { get; set; } public int PREFERRED_INDEX { get; set; } + public bool HAS_PIGMENT { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CATS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs index d26e67908..17bc2683d 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs @@ -1,4 +1,4 @@ -// T4 code generation is enabled for model 'C:\DATA\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. +// T4 code generation is enabled for model 'D:\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 1b09c2a5b..697acab25 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -610,6 +610,7 @@ + @@ -3524,6 +3525,7 @@ + @@ -5679,6 +5681,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 880d548b5..24addbde8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,76 +5,76 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index a7fcd4ade..401123106 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -907,8 +907,11 @@ namespace Tango.Emulations.Emulators } _continousResponseTokens.Clear(); - - Transporter.SendResponse(new DisconnectResponse(), request.Container.Token); + try + { + Transporter.SendResponse(new DisconnectResponse(), request.Container.Token); + } + catch { } } private void HandleConnectRequest(TangoMessage request) diff --git a/Software/Visual_Studio/Tango.Settings/SettingsBase.cs b/Software/Visual_Studio/Tango.Settings/SettingsBase.cs index 157a80feb..aea135393 100644 --- a/Software/Visual_Studio/Tango.Settings/SettingsBase.cs +++ b/Software/Visual_Studio/Tango.Settings/SettingsBase.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -9,7 +11,7 @@ namespace Tango.Settings /// /// Represents a settings object base class. /// - public abstract class SettingsBase + public abstract class SettingsBase : INotifyPropertyChanged { internal Action SaveAction { get; set; } @@ -26,5 +28,28 @@ namespace Tango.Settings SaveAction(); } + + /// + /// Occurs when a property value changes. + /// + public event PropertyChangedEventHandler PropertyChanged; + + /// + /// Raises the property changed event. + /// + /// Name of the property. + protected virtual void RaisePropertyChanged(String propName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); + } + + /// + /// Raises the property changed event. + /// + /// Name of the property. + protected virtual void RaisePropertyChangedAuto([CallerMemberName] string caller = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); + } } } diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs index f1e6d9c46..d3d8730f0 100644 --- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs +++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs @@ -1147,6 +1147,8 @@ namespace Tango.Transport /// private void KeepAliveThreadMethod() { + bool aborted = false; + try { Thread.Sleep(2000); @@ -1171,7 +1173,7 @@ namespace Tango.Transport } catch (Exception ex) when (ex is TimeoutException || ex is AggregateException) { - if (State != TransportComponentState.Connected) return; + if (State != TransportComponentState.Connected || aborted) return; if (UseKeepAlive) { @@ -1181,12 +1183,13 @@ namespace Tango.Transport } catch (ThreadAbortException) { + aborted = true; LogManager.Log("KeepAlive thread has been aborted."); return; } catch (Exception ex) { - if (State != TransportComponentState.Connected) return; + if (State != TransportComponentState.Connected || aborted) return; if (UseKeepAlive) { -- cgit v1.3.1