From f8fc1e8e52e9758c23607b5e9e2dd1c379a37117 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 11 Dec 2019 15:35:18 +0200 Subject: Implement alphanumeric sorting on hw comparison and hw configuration in MachineStudio. Related Work Items: #1619 --- .../ViewModels/ComparisonWizardViewVM.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs index 47a40ade4..3c71cc949 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs @@ -281,6 +281,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -303,6 +304,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -325,6 +327,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -347,6 +350,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -369,6 +373,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -391,6 +396,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -413,6 +419,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels collection.Components.Add(componentResult); } + collection.Components = collection.Components.OrderByAlphaNumeric(x => x.ComponentName).ToSynchronizedObservableCollection(); return collection; } @@ -432,7 +439,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels result.Properties.Add(hProp); } - + result.Properties = result.Properties.OrderByAlphaNumeric(x => x.PropertyName).ToSynchronizedObservableCollection(); return result; } -- cgit v1.3.1 From 633c35f15e95240117af791a7343a0ba68556fcf Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 18 Dec 2019 13:47:32 +0200 Subject: Removed sorting for component properties. Related Work Items: #1619 --- .../ViewModels/ComparisonWizardViewVM.cs | 1 - .../ViewModels/HardwareConfigurationViewVM.cs | 1 - 2 files changed, 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs index 3c71cc949..a58d69a93 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs @@ -439,7 +439,6 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels result.Properties.Add(hProp); } - result.Properties = result.Properties.OrderByAlphaNumeric(x => x.PropertyName).ToSynchronizedObservableCollection(); return result; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/HardwareConfigurationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/HardwareConfigurationViewVM.cs index 42984a82d..51d88c3f9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/HardwareConfigurationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/HardwareConfigurationViewVM.cs @@ -286,7 +286,6 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels hProp.ActualValue = configParam != null ? configParam.Value : null; hwComponent.Properties.Add(hProp); } - hwComponent.Properties = hwComponent.Properties.OrderByAlphaNumeric(x => x.PropertyName).ToSynchronizedObservableCollection(); return hwComponent; } -- cgit v1.3.1