diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-09 10:21:13 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-09 10:21:13 +0200 |
| commit | 7ae452b5edf226e02de077b0181bd50723124fbb (patch) | |
| tree | 5a4b945b945e75a28f9144e2567596a539302d84 /Software/Visual_Studio | |
| parent | 065e754c221e69b7c12b72c92a0d6168623449d4 (diff) | |
| download | Tango-7ae452b5edf226e02de077b0181bd50723124fbb.tar.gz Tango-7ae452b5edf226e02de077b0181bd50723124fbb.zip | |
Minor fixes.
Diffstat (limited to 'Software/Visual_Studio')
4 files changed, 17 insertions, 9 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml index cfdf46701..7edf8dab9 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml @@ -65,7 +65,7 @@ </Grid>--> <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> - <ListBox ItemsSource="{Binding Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> + <ListBox ItemsSource="{Binding Configuration.IdsPacksOrderedByPackIndex}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> <Setter Property="Padding" Value="0"></Setter> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml index 5f1ff4c9d..68b0a839c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml @@ -614,8 +614,8 @@ <Grid x:Name="CMYKgrid" Grid.Row="2" Margin="80 0 93 0" Style="{StaticResource DisableOnSaveMyColorsGrid}"> <DockPanel> - <touch:TouchListBox DockPanel.Dock="Top" ItemsSource="{Binding SelectedBrushStop.LiquidVolumes}" IsTabStop="False" MinWidth="200"> - <touch:TouchListBox.ItemTemplate> + <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding SelectedBrushStop.LiquidVolumes}" IsTabStop="False" MinWidth="200"> + <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type models:LiquidVolumeModel}"> <touch:TouchColorPickerControl Margin=" 0 10 0 0" MinWidth="200" MinValue="0" IsTabStop="False" ColorPickerText="{Binding IdsPack.LiquidType.Name}" @@ -636,8 +636,8 @@ </touch:TouchColorPickerControl.PickerBrush> </touch:TouchColorPickerControl> </DataTemplate> - </touch:TouchListBox.ItemTemplate> - </touch:TouchListBox> + </ItemsControl.ItemTemplate> + </ItemsControl> <!--<touch:TouchColorPickerCMYKControl DockPanel.Dock="Top" x:Name="CMYKPicker" ThumbHeight="30" ThumbHeightInside="28" IsTabStop="False" diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index ff66130bb..1966d88f6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -431,7 +431,8 @@ namespace Tango.PPC.UI.ViewModels Max = x.MidTankType.LiterCapacity, IDSPack = x, JerricanPresent = true, - }).OrderBy(y => y.IDSPack.LiquidType.Type).ToList(); + }).ToList(); + var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank).FirstOrDefault(); MidTankLubLevel = new JerricanLevelModel() { JerricanPresent = true }; @@ -483,10 +484,9 @@ namespace Tango.PPC.UI.ViewModels foreach (var item in status.IDSPacksLevels) { JerricanLevelModel model = null; - if (item.Index == 8)//lub + if (item.Index == MidTankLubLevel.IDSPack.PackIndex)//lub { model = MidTankLubLevel; - } else { @@ -610,7 +610,7 @@ namespace Tango.PPC.UI.ViewModels List<LiquidOutputModel> outputs = new List<LiquidOutputModel>(); - var idsPacks = MachineProvider.Machine.Configuration.GetSupportedIdsPacks(Job.Rml); + var idsPacks = MachineProvider.Machine.Configuration.GetSupportedIdsPacks(Job.Rml).OrderBy(x => x.PackIndex).ToList(); foreach (var idsPack in idsPacks.Where(x => x.LiquidType.HasPigment)) { diff --git a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs index 1c9b795fa..2e1ceba67 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs @@ -24,6 +24,14 @@ namespace Tango.BL.Entities get { return IdsPacks.Where(x => !x.IsEmpty); } } + [NotMapped] + [XmlIgnore] + [JsonIgnore] + public List<IdsPack> IdsPacksOrderedByPackIndex + { + get { return IdsPacks.OrderBy(x => x.PackIndex).ToList(); } + } + /// <summary> /// Gets a collection of this configuration IDS packs where packs are not 'empty' and are supported by the specified <see cref="Rml"/>. /// </summary> |
