diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-31 13:30:15 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-31 13:30:15 +0200 |
| commit | 80c023fa734d7788e155d4f311ab16220aa80650 (patch) | |
| tree | dc79c0689e00419c7f447d1b32716df99df8f278 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml | |
| parent | 2fa92ca3654ebb274482f9bad86231028d357e5a (diff) | |
| download | Tango-80c023fa734d7788e155d4f311ab16220aa80650.tar.gz Tango-80c023fa734d7788e155d4f311ab16220aa80650.zip | |
Job Brush working nicely.
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.xaml | 97 |
1 files changed, 73 insertions, 24 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 e0786a1ba..0c3cd62b5 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 @@ -40,6 +40,8 @@ <localConverters:JobToColumnDefinitionsConverter x:Key="JobToColumnDefinitionsConverter" /> <localConverters:SegmentLengthToWidthConverter x:Key="SegmentLengthToWidthConverter" /> <localConverters:SegmentToGradientStopsConverterMulti x:Key="SegmentToGradientStopsConverterMulti" /> + <localConverters:SegmentToBrushConverter x:Key="SegmentToBrushConverter" /> + <localConverters:SegmentToBrushConverterMulti x:Key="SegmentToBrushConverterMulti" /> <SolidColorBrush x:Key="SideBarBackground" Color="#F9F9F9"> @@ -232,15 +234,34 @@ </ListBox> </DockPanel> </Border> - <ItemsControl ItemsSource="{Binding RmlProcessParametersTableGroup.ProcessParametersTables}" IsEnabled="{Binding RmlProcessParametersTableGroup.Active}"> - <ItemsControl.ItemsPanel> + <ListBox ScrollViewer.VerticalScrollBarVisibility="Disabled" BorderThickness="0" Style="{x:Null}" HorizontalContentAlignment="Stretch" ItemsSource="{Binding RmlProcessParametersTableGroup.ProcessParametersTables}" SelectedItem="{Binding SelectedProcessParametersTable}" IsEnabled="{Binding RmlProcessParametersTableGroup.Active}"> + <ListBox.ItemContainerStyle> + <Style TargetType="ListBoxItem" BasedOn="{StaticResource basicListBoxItem}"> + + </Style> + </ListBox.ItemContainerStyle> + <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"></WrapPanel> </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> + </ListBox.ItemsPanel> + <ListBox.ItemTemplate> <DataTemplate DataType="{x:Type observables:ProcessParametersTable}"> - <Border Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver" Height="250" Margin="0 0 10 0"> + <Border Padding="5" CornerRadius="5" BorderThickness="1" Height="245" Margin="0 0 10 0"> + <Border.Style> + <Style TargetType="Border" BasedOn="{StaticResource brushStopBorder}"> + <Setter Property="BorderBrush" Value="Silver"></Setter> + <Setter Property="Opacity" Value="0.5"></Setter> + <Setter Property="Background" Value="{StaticResource SideBarBackground}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> + <Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter> + <Setter Property="Background" Value="White"></Setter> + <Setter Property="Opacity" Value="1"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> <DockPanel> <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox> <WrapPanel Orientation="Vertical" Margin="0 5 0 0"> @@ -305,8 +326,8 @@ </DockPanel> </Border> </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </ListBox.ItemTemplate> + </ListBox> <StackPanel Margin="5 0 0 10" VerticalAlignment="Bottom"> <Button Command="{Binding SaveProcessParametersCommand}">SAVE GROUP</Button> @@ -448,7 +469,7 @@ </StackPanel> <DockPanel LastChildFill="True"> <ToggleButton Margin="10 0 0 0" DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" IsChecked="{Binding SelectedJob.EnableInterSegment}"></ToggleButton> - <mahapps:NumericUpDown IsEnabled="{Binding SelectedJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown StringFormat="{}{0:N1} m" IsEnabled="{Binding SelectedJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown> </DockPanel> </StackPanel> </Border> @@ -549,7 +570,7 @@ <Image Source="../Images/ruler.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Length</TextBlock> </StackPanel> - <mahapps:NumericUpDown IsEnabled="{Binding SelectedJob.EnableInterSegment}" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown StringFormat="{}{0:N1} m" IsEnabled="{Binding SelectedJob.EnableInterSegment}" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> </StackPanel> @@ -952,7 +973,7 @@ <StackPanel HorizontalAlignment="Left" Margin="0 0 0 0"> <TextBlock FontSize="14" Margin="0 20 0 0"> <Run FontWeight="Bold">ESTIMATED DURATION:</Run> - <Run FontSize="18" Foreground="{StaticResource AccentColorBrush}" FontStyle="Italic" FontFamily="digital-7">00:00:00</Run> + <Run FontSize="18" Foreground="{StaticResource AccentColorBrush}" FontStyle="Italic" FontFamily="digital-7" Text="{Binding EstimatedDuration,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00'}"></Run> </TextBlock> </StackPanel> </Grid> @@ -969,12 +990,12 @@ </Grid> <Grid> - <Border VerticalAlignment="Center" Height="10" Margin="20 0 20 0" BorderBrush="Gainsboro" BorderThickness="1"> - <Grid> - <ItemsControl ItemsSource="{Binding SelectedJob.Segments}" x:Name="jobBrushList"> + <Border VerticalAlignment="Center" Height="10" Margin="30 0 40 0" BorderBrush="Gainsboro" BorderThickness="1" ClipToBounds="False"> + <Grid ClipToBounds="False"> + <ItemsControl x:Name="jobBrushList" ClipToBounds="False"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <StackPanel Orientation="Horizontal"></StackPanel> + <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> @@ -990,22 +1011,50 @@ </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> + <MultiBinding Converter="{StaticResource SegmentToBrushConverterMulti}"> + <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> </Rectangle.Fill> </Rectangle> + + <StackPanel Margin="0 -23 0 0" HorizontalAlignment="Right"> + <TextBlock FontSize="9" HorizontalAlignment="Right"> + <Run Text="{Binding Length,Mode=OneWay}"></Run> + <Run Foreground="Gray" FontSize="8" Text="m"></Run> + </TextBlock> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8" Foreground="DimGray"> + <materialDesign:PackIcon.RenderTransform> + <RotateTransform Angle="180" /> + </materialDesign:PackIcon.RenderTransform> + </materialDesign:PackIcon> + </StackPanel> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> + + <StackPanel Margin="-20 -26 0 0" HorizontalAlignment="Left"> + <TextBlock FontSize="9"> + <Run Text="0"></Run> + <Run Foreground="Gray" FontSize="8" Text="m"></Run> + </TextBlock> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16" Foreground="DimGray"> + + </materialDesign:PackIcon> + </StackPanel> + + <StackPanel Margin="0 -26 -30 0" HorizontalAlignment="Right"> + <TextBlock FontSize="9"> + <Run Text="{Binding SelectedJob.Length,Mode=OneWay}"></Run> + <Run Foreground="Gray" FontSize="8" Text="m"></Run> + </TextBlock> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16" Foreground="DimGray"> + + </materialDesign:PackIcon> + </StackPanel> </Grid> </Border> </Grid> |
