diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
2 files changed, 26 insertions, 3 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 a32fa58df..073f79a97 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 @@ -233,7 +233,22 @@ namespace Tango.MachineStudio.Developer.ViewModels public List<LiquidTypesRml> LiquidTypesRmls { get { return _liquidTypesRmls; } - set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); } + set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(LiquidTypesRmlsOrdered)); } + } + + public List<LiquidTypesRml> LiquidTypesRmlsOrdered + { + get + { + if (Settings.UsePreferredLiquidVolumeIndex) + { + return LiquidTypesRmls.OrderBy(x => x.LiquidType.PreferredIndex).ToList(); + } + else + { + return LiquidTypesRmls; + } + } } private ProcessParametersTablesGroup _rmlProcessParametersTablesGroup; @@ -841,6 +856,14 @@ namespace Tango.MachineStudio.Developer.ViewModels { Settings = SettingsManager.Default.GetOrCreate<DeveloperModuleSettings>(); + Settings.PropertyChanged += (x, e) => + { + if (e.PropertyName == nameof(Settings.UsePreferredLiquidVolumeIndex)) + { + RaisePropertyChanged(nameof(LiquidTypesRmlsOrdered)); + } + }; + AutoProcessSelection = Settings.AutoProcessSelection; SelectedJobs = new ObservableCollection<Job>(); 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 4217d9712..c9842d494 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 @@ -793,7 +793,7 @@ </StackPanel> - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 40 250 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 25 350 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <materialDesign:PackIcon Kind="ChevronLeft" Width="24" Height="24" /> <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>MEDIA LIQUIDS</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run></TextBlock> <materialDesign:PackIcon Kind="ChevronRight" Width="24" Height="24" /> @@ -802,7 +802,7 @@ <Grid HorizontalAlignment="Right" Margin="0 0 0 0"> <StackPanel HorizontalAlignment="Right" Margin="0 0 0 0"> <StackPanel Margin="0 10 0 0" Orientation="Horizontal" VerticalAlignment="Center"> - <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> + <ItemsControl ItemsSource="{Binding LiquidTypesRmlsOrdered}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"></WrapPanel> |
