From 4717b98b45c9e40e1329d3b49b91bfbd3feb50f6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 5 Dec 2018 17:10:35 +0200 Subject: Optimized color conversion frequency on research module. --- .../Views/JobView.xaml.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs') 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 d96f130ae..8c58690fd 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 @@ -292,5 +292,25 @@ namespace Tango.MachineStudio.Developer.Views Keyboard.ClearFocus(); listBoxSegments.Focus(); } + + private void OnBrushStopFieldValueChanged(object sender, RoutedPropertyChangedEventArgs e) + { + BrushStop stop = null; + var dataContext = (sender as FrameworkElement).DataContext; + + if (dataContext != null) + { + if (dataContext is BrushStop) + { + stop = dataContext as BrushStop; + } + else + { + stop = (dataContext as LiquidVolume).BrushStop; + } + + _vm.OnBrushStopFieldValueChanged(stop); + } + } } } -- cgit v1.3.1