diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-23 23:06:51 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-23 23:06:51 +0200 |
| commit | 941679fac898ab6c488674f611e157d5094a8c83 (patch) | |
| tree | dea9ab97cefed258aeae14539ca04c5ddec79bfc /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views | |
| parent | 673094ec9200776ff0867ee74be29dff3e275294 (diff) | |
| download | Tango-941679fac898ab6c488674f611e157d5094a8c83.tar.gz Tango-941679fac898ab6c488674f611e157d5094a8c83.zip | |
Fixed issue with machine studio job view performance.
Added support for cct caching on RmlBuilder.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
2 files changed, 24 insertions, 92 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 32b7ccd86..395809c6f 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 @@ -27,6 +27,7 @@ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views" + xmlns:localControls="clr-namespace:Tango.MachineStudio.Developer.Controls" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}" x:Name="control"> @@ -1320,78 +1321,9 @@ </Button> </Grid> - <Grid Margin="0 -18 0 0"> + <Grid Margin="0 -5 0 0"> <Border VerticalAlignment="Center" Height="55" Margin="30 0 40 0" ClipToBounds="False"> - <Grid ClipToBounds="False"> - <ItemsControl x:Name="jobBrushList" ClipToBounds="False" Margin="40 0 50 0"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <Grid> - <Grid.Width> - <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.ActiveJob.Length"></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> - <Binding Path="Length"></Binding> - </MultiBinding> - </Grid.Width> - <Rectangle VerticalAlignment="Bottom" Height="20"> - <Rectangle.Fill> - <MultiBinding Converter="{StaticResource SegmentToBrushConverterMulti}"> - <Binding Path="."></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.ActiveJob"></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.ActiveJob.Length"></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.SelectedBrushStop.Color"></Binding> - </MultiBinding> - </Rectangle.Fill> - </Rectangle> - - <StackPanel Margin="0 0 0 0" HorizontalAlignment="Center"> - <TextBlock FontSize="12" HorizontalAlignment="Right" Foreground="{StaticResource BlackForegroundBrush}"> - <Run Text="{Binding Length,Mode=OneWay,StringFormat=N2}"></Run> - <Run Foreground="{StaticResource GrayBrush250}" FontSize="10" Text="m"></Run> - </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8" Foreground="{StaticResource DimGrayBrush}"> - <materialDesign:PackIcon.RenderTransform> - <RotateTransform Angle="180" /> - </materialDesign:PackIcon.RenderTransform> - </materialDesign:PackIcon> - </StackPanel> - </Grid> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - - <StackPanel Margin="-30 -5 0 0" HorizontalAlignment="Left"> - <TextBlock FontSize="12" Foreground="{StaticResource BlackForegroundBrush}"> - <Run Text="0"></Run> - <Run Foreground="{StaticResource GrayBrush250}" FontSize="10" Text="m"></Run> - </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16" Foreground="{StaticResource DimGrayBrush}"> - - </materialDesign:PackIcon> - </StackPanel> - - <StackPanel Margin="0 -5 -20 0" HorizontalAlignment="Right"> - <TextBlock FontSize="12" Foreground="{StaticResource BlackForegroundBrush}"> - <Run Text="{Binding ActiveJob.Length,Mode=OneWay,StringFormat=N2}"></Run> - <Run Foreground="Gray" FontSize="10" Text="m"></Run> - <Run>x</Run> - <Run Text="{Binding ActiveJob.NumberOfUnits}"></Run> - </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16" Foreground="{StaticResource DimGrayBrush}"> - - </materialDesign:PackIcon> - </StackPanel> - - <Border BorderBrush="{StaticResource BorderBrushGainsboro}" BorderThickness="1" VerticalAlignment="Bottom" Height="20" Margin="40 0 50 0"> - - </Border> - </Grid> + <localControls:JobSummeryViewer DataContext="{Binding ActiveJob}" /> </Border> </Grid> </DockPanel> 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 94c1ed802..6e9c62e74 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 @@ -64,29 +64,29 @@ namespace Tango.MachineStudio.Developer.Views { if (_vm != null && _vm.ActiveJob != null) { - List<Segment> segments = new List<Segment>(); - foreach (var s in _vm.ActiveJob.OrderedSegments) - { - segments.Add(s); + //List<Segment> segments = new List<Segment>(); + //foreach (var s in _vm.ActiveJob.OrderedSegments) + //{ + // segments.Add(s); - if (_vm.ActiveJob.EnableInterSegment && _vm.ActiveJob.OrderedSegments.IndexOf(s) != _vm.ActiveJob.OrderedSegments.Count - 1) - { - segments.Add(new Segment() - { - Length = _vm.ActiveJob.InterSegmentLength, - BrushStops = new SynchronizedObservableCollection<BrushStop>() - { - new BrushStop() - { - ColorSpace = new ColorSpace(), - Color = Colors.White, - } - }, - }); - } - } + // if (_vm.ActiveJob.EnableInterSegment && _vm.ActiveJob.OrderedSegments.IndexOf(s) != _vm.ActiveJob.OrderedSegments.Count - 1) + // { + // segments.Add(new Segment() + // { + // Length = _vm.ActiveJob.InterSegmentLength, + // BrushStops = new SynchronizedObservableCollection<BrushStop>() + // { + // new BrushStop() + // { + // ColorSpace = new ColorSpace(), + // Color = Colors.White, + // } + // }, + // }); + // } + //} - jobBrushList.ItemsSource = segments; + //jobBrushList.ItemsSource = segments; UpdateGradientBrushDisplay(); } } |
