aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml12
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs16
2 files changed, 22 insertions, 6 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
index 240abc688..5f1ff4c9d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
@@ -527,7 +527,7 @@
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
- <touch:TouchImageButton Grid.Row="0" Margin="0 2 45 0" HorizontalAlignment="Right" Width="Auto" Height="70" EnableDropShadow="False" Background="Transparent" BorderThickness="0"
+ <touch:TouchImageButton Grid.Row="0" Margin="0 2 45 0" HorizontalAlignment="Right" Width="Auto" Height="70" EnableDropShadow="False" Background="Transparent" BorderThickness="0"
Command="{ Binding VectorFineTuningCommand}" >
<touch:TouchImageButton.Template>
<ControlTemplate TargetType="touch:TouchImageButton">
@@ -596,7 +596,7 @@
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
- <touch:TouchImageButton Grid.Row="0" Margin="0 2 45 0" HorizontalAlignment="Right" Width="Auto" Height="70" EnableDropShadow="False" Background="Transparent" BorderThickness="0"
+ <touch:TouchImageButton Visibility="{Binding FineTuningEnabled,Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Row="0" Margin="0 2 45 0" HorizontalAlignment="Right" Width="Auto" Height="70" EnableDropShadow="False" Background="Transparent" BorderThickness="0"
Command="{ Binding VectorFineTuningCommand}" >
<touch:TouchImageButton.Template>
<ControlTemplate TargetType="touch:TouchImageButton">
@@ -614,8 +614,8 @@
<Grid x:Name="CMYKgrid" Grid.Row="2" Margin="80 0 93 0" Style="{StaticResource DisableOnSaveMyColorsGrid}">
<DockPanel>
- <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding SelectedBrushStop.LiquidVolumes}" IsTabStop="False" MinWidth="200">
- <ItemsControl.ItemTemplate>
+ <touch:TouchListBox DockPanel.Dock="Top" ItemsSource="{Binding SelectedBrushStop.LiquidVolumes}" IsTabStop="False" MinWidth="200">
+ <touch:TouchListBox.ItemTemplate>
<DataTemplate DataType="{x:Type models:LiquidVolumeModel}">
<touch:TouchColorPickerControl Margin=" 0 10 0 0" MinWidth="200" MinValue="0" IsTabStop="False"
ColorPickerText="{Binding IdsPack.LiquidType.Name}"
@@ -636,8 +636,8 @@
</touch:TouchColorPickerControl.PickerBrush>
</touch:TouchColorPickerControl>
</DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
+ </touch:TouchListBox.ItemTemplate>
+ </touch:TouchListBox>
<!--<touch:TouchColorPickerCMYKControl DockPanel.Dock="Top" x:Name="CMYKPicker" ThumbHeight="30" ThumbHeightInside="28"
IsTabStop="False"
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
index 4ba8a6ebf..5b750189f 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
@@ -414,6 +414,21 @@ namespace Tango.PPC.Jobs.Dialogs
set { _vectorFineTuningDialogVM = value; RaisePropertyChangedAuto(); }
}
+ public bool FineTuningEnabled
+ {
+ get
+ {
+ if (SelectedBrushStop == null) return false;
+ var idsPacks = MachineProvider.Machine.Configuration.GetSupportedIdsPacks(SelectedBrushStop.SegmentModel.Job.Rml).ToList();
+ if (!idsPacks.Exists(x => x.LiquidType.Type == LiquidTypes.Cyan)) return false;
+ if (!idsPacks.Exists(x => x.LiquidType.Type == LiquidTypes.Magenta)) return false;
+ if (!idsPacks.Exists(x => x.LiquidType.Type == LiquidTypes.Yellow)) return false;
+ if (!idsPacks.Exists(x => x.LiquidType.Type == LiquidTypes.Black)) return false;
+
+ return true;
+ }
+ }
+
private String _myColorName;
public String MyColorName
@@ -634,6 +649,7 @@ namespace Tango.PPC.Jobs.Dialogs
SelectedBrushStop.ColorChanged += OnBrushColorChanged;
CheckIsSelectedColorInLibrary();
SelectedBrushStop.ConvertColor();//test OOG
+ RaisePropertyChanged(nameof(FineTuningEnabled));
}
private void OnSelectedtabChanged()