diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:42:52 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:42:52 +0200 |
| commit | 92de61904c6ae3f8455827944b4aa62c5582bbb5 (patch) | |
| tree | d02f1ce1294b93400d7732356d54edf24766af17 /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | 84708ec080fb94ccf637ac623967fd0e538c1fb5 (diff) | |
| parent | b77fbb01ed5b63b65f6e755fef9ca49c3e58ea50 (diff) | |
| download | Tango-92de61904c6ae3f8455827944b4aa62c5582bbb5.tar.gz Tango-92de61904c6ae3f8455827944b4aa62c5582bbb5.zip | |
Merged Extra Inks to Software.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
4 files changed, 93 insertions, 118 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs index 75846431f..0dbbdfd3c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs @@ -32,6 +32,8 @@ namespace Tango.PPC.UI.Converters return Application.Current.Resources["TangoCyanInkBrush"] as Brush; case BL.Enumerations.LiquidTypes.Magenta: return Application.Current.Resources["TangoMagentaInkBrush"] as Brush; + case BL.Enumerations.LiquidTypes.Violet: + return Application.Current.Resources["TangoVioletInkBrush"] as Brush; case BL.Enumerations.LiquidTypes.LightCyan: return Application.Current.Resources["TangoLightCyanInkBrush"] as Brush; case BL.Enumerations.LiquidTypes.LightMagenta: diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index c7ba2e24d..afb536c58 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -180,6 +180,8 @@ namespace Tango.PPC.UI.ViewModels // if (_currentBrushStop != value) { _currentBrushStop = value; + + OnUpdateCurrentBrush(); RaisePropertyChangedAuto(); } @@ -188,41 +190,6 @@ namespace Tango.PPC.UI.ViewModels public JobBrushStop JobBrushStop { get; set; } - public double CyanOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Cyan); } - } - - public double MagentaOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Magenta); } - } - - public double YellowOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Yellow); } - } - - public double BlackOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Black); } - } - - public double LightCyanOutput - { - get { return GetVolumeLiquidType(LiquidTypes.LightCyan); } - } - - public double LightMagentaOutput - { - get { return GetVolumeLiquidType(LiquidTypes.LightMagenta); } - } - - public double LightYellowOutput - { - get { return GetVolumeLiquidType(LiquidTypes.LightYellow); } - } - //public double TransparentInkOutput //{ // get { return GetVolumeLiquidType(LiquidTypes.TransparentInk); } @@ -372,6 +339,12 @@ namespace Tango.PPC.UI.ViewModels } } + private List<LiquidOutputModel> _liquidOutputs; + public List<LiquidOutputModel> LiquidOutputs + { + get { return _liquidOutputs; } + set { _liquidOutputs = value; RaisePropertyChangedAuto(); } + } #endregion @@ -635,6 +608,22 @@ namespace Tango.PPC.UI.ViewModels { _handler = e.JobHandler; Job = e.Job; + + List<LiquidOutputModel> outputs = new List<LiquidOutputModel>(); + + var idsPacks = MachineProvider.Machine.Configuration.GetSupportedIdsPacks(Job.Rml); + + foreach (var idsPack in idsPacks.Where(x => x.LiquidType.HasPigment)) + { + outputs.Add(new LiquidOutputModel() + { + LiquidType = idsPack.LiquidType, + Volume = 0, + }); + } + + LiquidOutputs = outputs; + try { ResumeModel = JobResumeManager.GetJobResumeModel(Job.Guid); @@ -703,7 +692,14 @@ namespace Tango.PPC.UI.ViewModels { if (_runningJobStatus.CurrentSegment.IsInterSegment) { - CurrentBrushStop = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); + var brush = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); + if (brush != null) + { + brush = brush.CloneBrush(); + } + + CurrentBrushStop = brush; + JobBrushStop = null; } else @@ -731,7 +727,7 @@ namespace Tango.PPC.UI.ViewModels JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First(); } } - CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop; + CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop.CloneBrush(); } } } @@ -920,13 +916,12 @@ namespace Tango.PPC.UI.ViewModels protected void OnUpdateCurrentBrush() { - RaisePropertyChanged(nameof(CyanOutput)); - RaisePropertyChanged(nameof(LightCyanOutput)); - RaisePropertyChanged(nameof(MagentaOutput)); - RaisePropertyChanged(nameof(LightMagentaOutput)); - RaisePropertyChanged(nameof(YellowOutput)); - RaisePropertyChanged(nameof(LightYellowOutput)); - RaisePropertyChanged(nameof(BlackOutput)); + CurrentBrushStop.SetLiquidVolumes(MachineProvider.Machine.Configuration, Job.Rml, MachineProvider.MachineOperator.CurrentProcessParameters); + + foreach (var output in LiquidOutputs) + { + output.Volume = GetVolumeLiquidType(output.LiquidType.Type); + } } private void HideJobOutline() diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index c567421aa..27fb531c3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -45,28 +45,24 @@ </Style> <DataTemplate x:Key="CMYK_Template" DataType="{x:Type entities:BrushStop}"> - <UniformGrid Rows="1" Columns="4" Height="Auto" MinWidth="180"> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Cyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0" Text="C" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Cyan, StringFormat=0.##}" ></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Margin="0 0 0 0"> - <Border Width="50" Height="50" Background="Magenta" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0" Text="M" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Magenta, StringFormat=0.##}" ></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Margin="10 0 0 0"> - <Border Width="50" Height="50" Background="Yellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0" Text="Y" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Yellow, StringFormat=0.##}" ></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Margin="10 0 0 0"> - <Border Width="50" Height="50" Background="Black" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0" Text="K" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Black, StringFormat=0.##}"></TextBlock> - </StackPanel> - </UniformGrid> + <Viewbox MaxHeight="120" MaxWidth="300"> + <ItemsControl ItemsSource="{Binding LiquidVolumesOrderedPigmentedForStandardUser}" MinWidth="180" HorizontalAlignment="Left" Height="Auto"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal"></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Vertical" Margin="0 0 10 0"> + <Border Width="50" Height="50" Background="{Binding IdsPack.LiquidType.LiquidTypeBrush}" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0" Text="{Binding IdsPack.LiquidType.ShortName}" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Volume, StringFormat=0.##}" ></TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Viewbox> </DataTemplate> <DataTemplate x:Key="RGB_Template" DataType="{x:Type entities:BrushStop}"> @@ -75,13 +71,13 @@ <Border Width="50" Height="50" Background="Red" CornerRadius="16" HorizontalAlignment="Left"></Border> <TextBlock Margin="0 10 0 0" Text="R" FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Red}" ></TextBlock> - + </StackPanel> <StackPanel Orientation="Vertical" Margin="4 0 0 0"> <Border Width="50" Height="50" Background="Green" CornerRadius="16" HorizontalAlignment="Left"></Border> <TextBlock Margin="0 10 0 0" Text="G" FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Green}" ></TextBlock> - + </StackPanel> <StackPanel Orientation="Vertical" Margin="4 0 0 0"> <Border Width="50" Height="50" Background="Blue" CornerRadius="16" HorizontalAlignment="Left"></Border> @@ -97,16 +93,16 @@ <Border Width="50" Height="50" Background="Gray" CornerRadius="16" HorizontalAlignment="Left"></Border> <TextBlock Margin="0 10 0 0 " Text="L" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding L, StringFormat=0.##}" ></TextBlock> - + </StackPanel> <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left" Margin="5 0 0 0"> <Border Width="50" Height="50" Background="red" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " Text="a" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Text="A" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding A, StringFormat=0.##}" ></TextBlock> </StackPanel> <StackPanel Orientation="Vertical" Margin="10 0 0 0" Width="50"> <Border Width="50" Height="50" Background="Blue" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " Text="b" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Text="B" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" Style="{StaticResource SliderGreyTextStyle}" Text="{Binding B, StringFormat=0.##}" ></TextBlock> </StackPanel> </UniformGrid> @@ -315,8 +311,8 @@ <DockPanel> <TextBlock DockPanel.Dock="Bottom" Text="Waste" HorizontalAlignment="Center" Margin="0 8 0 0"></TextBlock> <Grid Height="15" DockPanel.Dock="Top"> - </Grid> - <Grid DockPanel.Dock="Top"> + </Grid> + <Grid DockPanel.Dock="Top"> <Grid ClipToBounds="True" HorizontalAlignment="Center"> <Path Fill="#CCCCCC"> <Path.Resources> @@ -329,7 +325,7 @@ <StaticResource ResourceKey="InkContainerPath"/> </CombinedGeometry.Geometry1> <CombinedGeometry.Geometry2> - + <RectangleGeometry Rect="1,0,30,88"> <!--<RectangleGeometry.Rect> <MultiBinding Converter="{StaticResource MidTankLevelToElementRectConverter}"> @@ -910,12 +906,12 @@ </StackPanel> <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left" Margin="5 0 0 0"> <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Text="a" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Text="A" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> </StackPanel> <StackPanel Orientation="Vertical" Margin="10 0 0 0" Width="50"> <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Text="b" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Text="B" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> </StackPanel> </UniformGrid> @@ -989,43 +985,25 @@ <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> </StackPanel> </UniformGrid> - <UniformGrid Columns="7" Rows="1" Margin="0 20 0 0" Width="440" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Cyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">C</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding CyanOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightCyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LC</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightCyanOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Magenta" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">M</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding MagentaOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightPink" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LM</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightMagentaOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Yellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">Y</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding YellowOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightYellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LY</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightYellowOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Black" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">K</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding BlackOutput}"></TextBlock> - </StackPanel> - </UniformGrid> + + <Viewbox Margin="0 20 0 0" MaxHeight="120"> + <ItemsControl ItemsSource="{Binding LiquidOutputs}" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal" /> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Margin="0 0 10 0" Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="{Binding LiquidType.LiquidTypeBrush}" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LiquidType.ShortName}"></TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding Volume}"></TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Viewbox> </StackPanel> </Grid> @@ -1165,9 +1143,9 @@ </Grid> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 3</TextBlock> </StackPanel> - - - + + + <!--<StackPanel Orientation="Vertical"> <Grid> @@ -1225,7 +1203,7 @@ </Grid> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Air</TextBlock> </StackPanel>--> - + <StackPanel Orientation="Vertical"> <Grid> <touch:TouchArcProgress RingThickness="8" Value="{Binding Tunnel.Value}" Maximum="{Binding Tunnel.MaxValue}" Minimum="0" Width="100" Height="100"> 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. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> |
