aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-12-30 18:18:27 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-12-30 18:18:27 +0200
commit62abc03d76ecfd8ab16ffefe6a4f6a7b94f62203 (patch)
tree58a7ce6bc30d7e049bf2b4c1aa272306796350eb /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
parent80221695b6c6fd48f7a3e2e70850e68788560b31 (diff)
parent71e6a3ec2197eba8b5e1b295914653426064f745 (diff)
downloadTango-62abc03d76ecfd8ab16ffefe6a4f6a7b94f62203.tar.gz
Tango-62abc03d76ecfd8ab16ffefe6a4f6a7b94f62203.zip
BAD MERGE.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml74
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs42
2 files changed, 92 insertions, 24 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 395809c6f..32b7ccd86 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,7 +27,6 @@
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">
@@ -1321,9 +1320,78 @@
</Button>
</Grid>
- <Grid Margin="0 -5 0 0">
+ <Grid Margin="0 -18 0 0">
<Border VerticalAlignment="Center" Height="55" Margin="30 0 40 0" ClipToBounds="False">
- <localControls:JobSummeryViewer DataContext="{Binding ActiveJob}" />
+ <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>
</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 6e9c62e74..94c1ed802 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();
}
}