aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-03-05 16:10:17 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-03-05 16:10:17 +0200
commit1834b13df30bcf71aab363f9e504c4e79b3f2224 (patch)
tree2778a4b38f9173aeeecee2b1a84a9793e83bc4f5 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
parentf40acd728957df61aad7fc0be2801ba8084b65fb (diff)
downloadTango-1834b13df30bcf71aab363f9e504c4e79b3f2224.tar.gz
Tango-1834b13df30bcf71aab363f9e504c4e79b3f2224.zip
Machine Studio. Fixed lubricant 0 Volume when change to RGB mode.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs5
3 files changed, 23 insertions, 1 deletions
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
/// <summary>
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 @@
<Image Source="../Images/colorspace.png" Width="24"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Color Space</TextBlock>
</StackPanel>
- <ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left">
+ <ComboBox SelectionChanged="OnBrushStopColorSpace_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left">
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
<Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
index a4a8fdcf4..94c1ed802 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
@@ -281,5 +281,10 @@ namespace Tango.MachineStudio.Developer.Views
{
listStops.SelectedItem = (sender as ListBoxItem).DataContext;
}
+
+ private void OnBrushStopColorSpace_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ _vm.OnBrushStopColorSpaceChanged((sender as ComboBox).DataContext as BrushStop);
+ }
}
}