diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-08-05 13:39:17 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-08-05 13:39:17 +0300 |
| commit | 649f1c03e08072bfe1c73adfbf377bcad58b4ec0 (patch) | |
| tree | e04d3d6db342e2499e7eaf2f10a2baea3c671f67 /Software/Visual_Studio/MachineStudio/Modules | |
| parent | a28eb2177c88edaa5097748de4dbd6f0133a0e7a (diff) | |
| parent | 592cf6ec8f64037215a8cdf50f41437698a13e81 (diff) | |
| download | Tango-649f1c03e08072bfe1c73adfbf377bcad58b4ec0.tar.gz Tango-649f1c03e08072bfe1c73adfbf377bcad58b4ec0.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
3 files changed, 13 insertions, 19 deletions
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 35c621822..5b29fd432 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 @@ -756,7 +756,7 @@ <StackPanel> <TextBlock>MEDIA</TextBlock> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> - <ComboBox Width="250" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}" Style="{StaticResource TransparentComboBoxStyle}" HorizontalContentAlignment="Stretch"> + <controls:SearchComboBox Width="250" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}" HorizontalContentAlignment="Stretch" SearchParam="Name"> <ComboBox.ItemTemplate> <DataTemplate> <DockPanel> @@ -771,7 +771,7 @@ </DockPanel> </DataTemplate> </ComboBox.ItemTemplate> - </ComboBox> + </controls:SearchComboBox> <!--<Button Margin="20 30 0 0" Command="{Binding EditRMLCommand}" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs index 7d05897d5..7d913299e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs @@ -346,7 +346,7 @@ namespace Tango.MachineStudio.RML.ViewModels if(!String.IsNullOrEmpty(result.ErrorMessage)) { - LogManager.Log(result.ErrorMessage, "Error occurred while trying to call GetLinearizationMeasurements."); + //LogManager.Log(result.ErrorMessage, "Error occurred while trying to call GetLinearizationMeasurements."); } return result.InkPercentage.ToList(); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index c31c95800..229d62df7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -34,7 +34,6 @@ namespace Tango.MachineStudio.RML.ViewModels private IAuthenticationProvider _authentication; private IActionLogManager _actionLogManager; private RmlDTO _rmlBeforeSave; - private static object _syncLock = new object(); private ObservablesContext _rmls_context; private ObservablesContext _active_context; @@ -56,8 +55,6 @@ namespace Tango.MachineStudio.RML.ViewModels set { _rmlssCollectionView = value; - BindingOperations.EnableCollectionSynchronization(_rmlssCollectionView, _syncLock); - RaisePropertyChangedAuto(); } } @@ -311,6 +308,15 @@ namespace Tango.MachineStudio.RML.ViewModels } RmlsCollectionView = CollectionViewSource.GetDefaultView(Rmls); RmlsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Descending)); + //RmlsCollectionView.Filter = new Predicate<object>(FilterCollection); + + RmlsCollectionView.Filter = (rml) => + { + Rml r = rml as Rml; + return String.IsNullOrWhiteSpace(RMLFilter) + || r.Name.ToLower().Contains(RMLFilter.ToLower()) //Rml name + || (r.MediaMaterial != null && r.MediaMaterial.Name.ToLower().Contains(RMLFilter.ToLower())); + }; } private async void LoadActiveRML(String guid) @@ -683,19 +689,7 @@ namespace Tango.MachineStudio.RML.ViewModels private void OnRMLFilterChanged() { - String filter = RMLFilter.ToLower(); - - RmlsCollectionView.Filter = (rml) => - { - Rml r = rml as Rml; - return String.IsNullOrWhiteSpace(filter) - || - r.Name.ToLower().Contains(filter) //Rml name - || - (r.MediaMaterial != null && r.MediaMaterial.Name.ToLower().Contains(filter)) // Material name - || - (r.Cct != null && r.Cct.FileName != null && r.Cct.FileName.ToString().Contains(filter)); //Cct.FileName - }; + RmlsCollectionView.Refresh(); } private void RemoveLiquidFactor(LiquidTypesRml liquidFactor) |
