From d3ba251f01ae987a14b6379e733a06dbcd77f9e4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 30 Jan 2018 18:21:37 +0200 Subject: Moved Observables to Integration !! Implemented basic sketch for IDS Pack Formulation. --- .../Converters/BrushStopCMYKToColorConverter.cs | 2 +- .../Converters/BrushStopLabToColorConverter.cs | 2 +- .../Converters/BrushStopToColorConverter.cs | 2 +- .../Converters/BrushStopToOffsetLimitConverter.cs | 2 +- .../Converters/DbRmlViewToEntityConverter.cs | 2 +- .../Converters/InkVolumeToLiquidRmlFactor.cs | 34 + .../Converters/SegmentToGradientStopsConverter.cs | 2 +- .../DeveloperModule.cs | 2 +- .../Tango.MachineStudio.Developer.csproj | 9 +- .../ViewModels/DBViewContextWrapper.cs | 2 +- .../ViewModels/MainViewVM.cs | 14 +- .../Views/MainView.xaml | 803 +++++++++++++-------- .../Views/MainView.xaml.cs | 2 +- 13 files changed, 545 insertions(+), 333 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/InkVolumeToLiquidRmlFactor.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopCMYKToColorConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopCMYKToColorConverter.cs index e21da8fbc..5bc163b18 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopCMYKToColorConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopCMYKToColorConverter.cs @@ -7,7 +7,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; -using Tango.DAL.Observables; +using Tango.Integration.Observables; namespace Tango.MachineStudio.Developer.Converters { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopLabToColorConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopLabToColorConverter.cs index 6c6d7959e..f3dc07d3e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopLabToColorConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopLabToColorConverter.cs @@ -7,7 +7,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; -using Tango.DAL.Observables; +using Tango.Integration.Observables; namespace Tango.MachineStudio.Developer.Converters { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToColorConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToColorConverter.cs index 5db8d03c0..33cd8cc78 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToColorConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToColorConverter.cs @@ -6,7 +6,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; -using Tango.DAL.Observables; +using Tango.Integration.Observables; namespace Tango.MachineStudio.Developer.Converters { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToOffsetLimitConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToOffsetLimitConverter.cs index c18a5679b..53efd50b8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToOffsetLimitConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/BrushStopToOffsetLimitConverter.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; -using Tango.DAL.Observables; +using Tango.Integration.Observables; namespace Tango.MachineStudio.Developer.Converters { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs index a2f0023cc..1fe3e5ab0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; -using Tango.DAL.Observables; +using Tango.Integration.Observables; using Tango.MachineStudio.Developer.ViewModels; namespace Tango.MachineStudio.Developer.Converters diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/InkVolumeToLiquidRmlFactor.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/InkVolumeToLiquidRmlFactor.cs new file mode 100644 index 000000000..3b675d23e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/InkVolumeToLiquidRmlFactor.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.Integration.Observables; +using static Tango.Integration.Observables.BrushStop; + +namespace Tango.MachineStudio.Developer.Converters +{ + //public class InkVolumeToLiquidRmlFactor : IMultiValueConverter + //{ + // public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + // { + // InkVolume inkVolume = values[0] as InkVolume; + // Rml selectedRml = values[1] as Rml; + + // if (inkVolume != null && selectedRml != null) + // { + // return inkVolume.GetLiquidMaxNanoliterPerCentimeter().ToString(); + // } + + // return String.Empty; + // } + + // public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + // { + // throw new NotImplementedException(); + // } + //} +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/SegmentToGradientStopsConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/SegmentToGradientStopsConverter.cs index 1588b7740..37908c940 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/SegmentToGradientStopsConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/SegmentToGradientStopsConverter.cs @@ -6,7 +6,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; -using Tango.DAL.Observables; +using Tango.Integration.Observables; namespace Tango.MachineStudio.Developer.Converters { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs index 4401245a9..1a405f861 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media.Imaging; -using Tango.DAL.Observables; +using Tango.Integration.Observables; using Tango.MachineStudio.Common; using Tango.MachineStudio.Developer.Views; using Tango.SharedUI.Helpers; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 5bae48c1a..1865ff11a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -76,6 +76,7 @@ + @@ -138,10 +139,6 @@ {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} Tango.Core - - {0ecd6da8-7aa6-48d9-8b65-279d176ad9af} - Tango.DAL.Observables - {38197109-8610-4d3f-92b9-16d48df94d7c} Tango.DAL.Remote @@ -150,6 +147,10 @@ {b112d89a-a106-41ae-a0c1-4abc84c477f5} Tango.DragAndDrop + + {4206ac58-3b57-4699-8835-90bf6db01a61} + Tango.Integration + {8491d07b-c1f6-4b62-a412-41b9fd2d6538} Tango.SharedUI diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/DBViewContextWrapper.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/DBViewContextWrapper.cs index 231c27bf2..21611a493 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/DBViewContextWrapper.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/DBViewContextWrapper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Tango.DAL.Observables; +using Tango.Integration.Observables; namespace Tango.MachineStudio.Developer.ViewModels { 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 5a1b46041..f6ddc9d19 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 @@ -9,7 +9,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Media; using Tango.Core.Commands; -using Tango.DAL.Observables; +using Tango.Integration.Observables; using Tango.MachineStudio.Common.Controls; using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.Common.StudioApplication; @@ -47,8 +47,8 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _selectedMachine = value; - RaisePropertyChangedAuto(); OnMachineChanged(); + RaisePropertyChangedAuto(); InvalidateRelayCommands(); if (_selectedMachine != null) @@ -145,8 +145,8 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _selectedRML = value; - RaisePropertyChangedAuto(); InvalidateLiquidFactorsAndProcessTables(); + RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } @@ -308,7 +308,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { if (SelectedSegment != null) { - SetSegmentBrushStopsInkVolumes(SelectedSegment); + SetSegmentBrushStopsLiquidVolumes(SelectedSegment); SelectedBrushStop = SelectedSegment.BrushStops.FirstOrDefault(); } } @@ -347,13 +347,13 @@ namespace Tango.MachineStudio.Developer.ViewModels #region Private Methods - private void SetSegmentBrushStopsInkVolumes(Segment segment) + private void SetSegmentBrushStopsLiquidVolumes(Segment segment) { if (!DesignMode) { foreach (var stop in segment.BrushStops) { - stop.SetInkVolumes(SelectedMachine.Configuration); + stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML); } } } @@ -526,7 +526,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { var stop = new BrushStop(); stop.ColorSpace = Adapter.ColorSpaces.FirstOrDefault(); - stop.SetInkVolumes(SelectedMachine.Configuration); + stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML); SelectedSegment.BrushStops.Add(stop); } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 90842b672..6e4d69d05 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -14,7 +14,7 @@ xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels" xmlns:localConverters="clr-namespace:Tango.MachineStudio.Developer.Converters" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" - xmlns:observables="clr-namespace:Tango.DAL.Observables;assembly=Tango.DAL.Observables" + xmlns:observables="clr-namespace:Tango.Integration.Observables;assembly=Tango.Integration" xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI" xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views" @@ -344,8 +344,8 @@ - - + + @@ -360,14 +360,16 @@ - - - - + + + + + + @@ -458,336 +460,511 @@ - - - - Description - + + + + + Description + - - - - + + + + + - - - - + + + + + + + + + - - - - SEGMENTS - + + + + SEGMENTS + - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - Name - - - - - - + + + + - - Length + + + + + Name + + + + + + + + + Length + + + + - + + + + + + + + + + + + + - - - - - - - - - - - - - - SEGMENT BRUSH - + + + + + + SEGMENT BRUSH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Color Space + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - Color Space - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + ESTIMATED DURATION: + 00:00:00 + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs index 52febe37b..c9796fbe2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs @@ -12,7 +12,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -using Tango.DAL.Observables; +using Tango.Integration.Observables; using Tango.DragAndDrop; using Tango.MachineStudio.Developer.Converters; using Tango.MachineStudio.Developer.ViewModels; -- cgit v1.3.1