aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml54
1 files changed, 48 insertions, 6 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
index 6e4d69d05..e0786a1ba 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
@@ -37,11 +37,16 @@
<localConverters:BrushStopLabToColorConverter x:Key="BrushStopLabToColorConverter" />
<localConverters:SegmentToGradientStopsConverter x:Key="SegmentToGradientStopsConverter" />
<localConverters:BrushStopToOffsetLimitConverter x:Key="BrushStopToOffsetLimitConverter" />
+ <localConverters:JobToColumnDefinitionsConverter x:Key="JobToColumnDefinitionsConverter" />
+ <localConverters:SegmentLengthToWidthConverter x:Key="SegmentLengthToWidthConverter" />
+ <localConverters:SegmentToGradientStopsConverterMulti x:Key="SegmentToGradientStopsConverterMulti" />
<SolidColorBrush x:Key="SideBarBackground" Color="#F9F9F9">
</SolidColorBrush>
+ <Color x:Key="dummyColor">Transparent</Color>
+
<Style x:Key="droppableGrid" TargetType="Grid">
<Setter Property="RenderTransform">
<Setter.Value>
@@ -599,7 +604,7 @@
<Setter Property="BorderBrush" Value="{StaticResource SideBarBackground}"></Setter>
<Setter Property="Background" Value="White"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True">
<Setter Property="BorderBrush" Value="Gainsboro"></Setter>
<Setter Property="Background" Value="{StaticResource SideBarBackground}"></Setter>
</DataTrigger>
@@ -838,10 +843,10 @@
<DataGridTemplateColumn Header="IDS PACK">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <Grid>
- <Polygon Points="0,0 20,0 0,20 0,0" Margin="-15 -11 0 0">
+ <Grid x:Name="t0">
+ <Polygon x:Name="t1" Points="0,0 20,0 0,20 0,0" Margin="-15 -11 0 0">
<Polygon.Fill>
- <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}" />
+ <SolidColorBrush x:Name="t2" Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter},FallbackValue={StaticResource dummyColor}}" />
</Polygon.Fill>
</Polygon>
<TextBlock TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}"></TextBlock>
@@ -964,7 +969,45 @@
</Grid>
<Grid>
- <Rectangle VerticalAlignment="Center" Height="10" Margin="20 0 20 0" Stroke="Gainsboro" StrokeThickness="1"></Rectangle>
+ <Border VerticalAlignment="Center" Height="10" Margin="20 0 20 0" BorderBrush="Gainsboro" BorderThickness="1">
+ <Grid>
+ <ItemsControl ItemsSource="{Binding SelectedJob.Segments}" x:Name="jobBrushList">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel Orientation="Horizontal"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Grid>
+ <Grid.Width>
+ <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}">
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.SelectedJob"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.SelectedJob.Length"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding>
+ <Binding Path="Length"></Binding>
+ </MultiBinding>
+ </Grid.Width>
+ <Rectangle>
+ <Rectangle.Fill>
+ <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
+ <LinearGradientBrush.GradientStops>
+ <MultiBinding Converter="{StaticResource SegmentToGradientStopsConverterMulti}">
+ <Binding Path="."></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.SelectedJob"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.SelectedJob.Length"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.SelectedBrushStop.Color"></Binding>
+ </MultiBinding>
+ </LinearGradientBrush.GradientStops>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </Grid>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Grid>
+ </Border>
</Grid>
</DockPanel>
</Grid>
@@ -1313,7 +1356,6 @@
<TextBox Style="{x:Null}" Background="Transparent" Foreground="Black" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox>
</Grid>
- <!--<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MaxNlPerCm,Mode=TwoWay}"></mahapps:NumericUpDown>-->
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>