aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml153
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs5
2 files changed, 141 insertions, 17 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 a1b607b8b..5dbb8604b 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
@@ -42,6 +42,8 @@
<localConverters:SegmentToGradientStopsConverterMulti x:Key="SegmentToGradientStopsConverterMulti" />
<localConverters:SegmentToBrushConverter x:Key="SegmentToBrushConverter" />
<localConverters:SegmentToBrushConverterMulti x:Key="SegmentToBrushConverterMulti" />
+ <localConverters:ObjectsNotEqualToBooleanConveter x:Key="ObjectsNotEqualToBooleanConveter" />
+ <localConverters:JobProgressToPositionConverter x:Key="JobProgressToPositionConverter" />
<SolidColorBrush x:Key="SideBarBackground" Color="White">
@@ -164,12 +166,12 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <Grid>
+ <Grid Background="#202020" TextElement.Foreground="Silver">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="LayoutTransform">
<Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="0" />
+ <ScaleTransform ScaleX="1" ScaleY="1" />
</Setter.Value>
</Setter>
<Style.Triggers>
@@ -192,11 +194,118 @@
</Style.Triggers>
</Style>
</Grid.Style>
- <Border BorderBrush="Silver" BorderThickness="0 0 0 1" Padding="10">
- <TextBlock>JOB RUNNING...</TextBlock>
+ <Border BorderBrush="#404040" BorderThickness="0 0 0 1" Padding="20">
+ <DockPanel>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
+ <ProgressBar Width="30" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="14" FontStyle="Italic" FontWeight="DemiBold">
+ <Run Text="Running '"></Run>
+ <Run Text="{Binding RunningJob.Name}"></Run>
+ <Run Text="'..."></Run>
+ </TextBlock>
+ </StackPanel>
+ <StackPanel DockPanel.Dock="Right">
+ <Button Height="40" Width="170" Command="{Binding StopJobCommand}" Background="#FF6464" BorderBrush="#FF6464">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Kind="Stop" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">STOP</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ <Grid>
+ <Grid>
+ <Border VerticalAlignment="Bottom" Width="1200" BorderBrush="#404040" BorderThickness="0" ClipToBounds="False">
+ <Grid ClipToBounds="False" Height="32">
+ <ItemsControl ClipToBounds="False" x:Name="runningJobBrushList">
+ <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.RunningJob"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJob.Length"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding>
+ <Binding Path="Length"></Binding>
+ </MultiBinding>
+ </Grid.Width>
+ <Rectangle Height="10" VerticalAlignment="Bottom">
+ <Rectangle.Fill>
+ <MultiBinding Converter="{StaticResource SegmentToBrushConverterMulti}">
+ <Binding Path="."></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJob"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJob.Length"></Binding>
+ </MultiBinding>
+ </Rectangle.Fill>
+ </Rectangle>
+
+ <StackPanel Margin="0 0 0 0" HorizontalAlignment="Center">
+ <TextBlock FontSize="9" HorizontalAlignment="Right">
+ <Run Text="{Binding Length,Mode=OneWay}"></Run>
+ <Run FontSize="8" Text="m"></Run>
+ </TextBlock>
+ <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8">
+ <materialDesign:PackIcon.RenderTransform>
+ <RotateTransform Angle="180" />
+ </materialDesign:PackIcon.RenderTransform>
+ </materialDesign:PackIcon>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <StackPanel Margin="-20 -5 0 0" HorizontalAlignment="Left">
+ <TextBlock FontSize="9">
+ <Run Text="0"></Run>
+ <Run FontSize="8" Text="m"></Run>
+ </TextBlock>
+ <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16">
+
+ </materialDesign:PackIcon>
+ </StackPanel>
+
+ <StackPanel Margin="0 -5 -20 0" HorizontalAlignment="Right">
+ <TextBlock FontSize="9">
+ <Run Text="{Binding RunningJob.Length,Mode=OneWay}"></Run>
+ <Run FontSize="8" Text="m"></Run>
+ </TextBlock>
+ <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16">
+
+ </materialDesign:PackIcon>
+ </StackPanel>
+
+ <Border BorderBrush="#404040" BorderThickness="1" VerticalAlignment="Bottom" Height="10">
+
+ </Border>
+
+ <Canvas x:Name="jobProgressCanvas">
+ <Grid Canvas.Top="0">
+ <Canvas.Left>
+ <MultiBinding Converter="{StaticResource JobProgressToPositionConverter}">
+ <Binding Path="RunningJob" />
+ <Binding Path="RunningJobProgress" />
+ <Binding ElementName="jobProgressCanvas" Path="ActualWidth" />
+ </MultiBinding>
+ </Canvas.Left>
+ <materialDesign:PackIcon Kind="MapMarker" Width="16" Height="16" Margin="-6 0 0 0" />
+ <TextBlock Margin="-4 -18 0 0" FontSize="10" Text="{Binding RunningJobProgress,StringFormat=0.0}"></TextBlock>
+ </Grid>
+ </Canvas>
+ </Grid>
+ </Border>
+ </Grid>
+ </Grid>
+ </DockPanel>
</Border>
+
+ <ProgressBar IsIndeterminate="True" VerticalAlignment="Bottom" Height="3"></ProgressBar>
</Grid>
-
+
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
@@ -316,7 +425,7 @@
</Style>
<Style TargetType="ContentControl">
- <Setter Property="FontFamily" Value="digital-7"></Setter>
+ <!--<Setter Property="FontFamily" Value="digital-7"></Setter>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
@@ -353,7 +462,7 @@
<DataTemplate>
<ContentControl>
<StackPanel>
- <TextBlock Text="{Binding Name}"></TextBlock>
+ <TextBlock Text="{Binding Name}" FontSize="10"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</ContentControl>
@@ -467,6 +576,12 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid>
+ <Grid.IsEnabled>
+ <MultiBinding Converter="{StaticResource ObjectsNotEqualToBooleanConveter}">
+ <Binding Path="SelectedJob" />
+ <Binding Path="RunningJob" />
+ </MultiBinding>
+ </Grid.IsEnabled>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
@@ -513,7 +628,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 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>
+ <mahapps:NumericUpDown StringFormat="{}{0:N1} m" FontFamily="digital-7" 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>
@@ -623,7 +738,7 @@
<Image Source="../Images/ruler.png" Width="32"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Length</TextBlock>
</StackPanel>
- <mahapps:NumericUpDown StringFormat="{}{0:N1} m" 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 FontFamily="digital-7" StringFormat="{}{0:N1} m" 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>
@@ -1043,7 +1158,7 @@
<Grid DockPanel.Dock="Right">
<StackPanel Orientation="Horizontal">
- <Button Height="40" Width="170" Command="{Binding StartJobCommand}">
+ <Button Height="40" Width="170" Command="{Binding StartJobCommand}" Click="OnJobStartClick">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Kind="ClockFast" />
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">START</TextBlock>
@@ -1052,8 +1167,8 @@
</StackPanel>
</Grid>
- <Grid>
- <Border VerticalAlignment="Center" Height="10" Margin="30 0 40 0" BorderBrush="Gainsboro" BorderThickness="1" ClipToBounds="False">
+ <Grid Margin="0 -18 0 0">
+ <Border VerticalAlignment="Center" Height="35" Margin="30 0 40 0" ClipToBounds="False">
<Grid ClipToBounds="False">
<ItemsControl x:Name="jobBrushList" ClipToBounds="False">
<ItemsControl.ItemsPanel>
@@ -1072,7 +1187,7 @@
<Binding Path="Length"></Binding>
</MultiBinding>
</Grid.Width>
- <Rectangle>
+ <Rectangle VerticalAlignment="Bottom" Height="10">
<Rectangle.Fill>
<MultiBinding Converter="{StaticResource SegmentToBrushConverterMulti}">
<Binding Path="."></Binding>
@@ -1083,7 +1198,7 @@
</Rectangle.Fill>
</Rectangle>
- <StackPanel Margin="0 -23 0 0" HorizontalAlignment="Right">
+ <StackPanel Margin="0 0 0 0" HorizontalAlignment="Center">
<TextBlock FontSize="9" HorizontalAlignment="Right">
<Run Text="{Binding Length,Mode=OneWay}"></Run>
<Run Foreground="Gray" FontSize="8" Text="m"></Run>
@@ -1099,7 +1214,7 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
- <StackPanel Margin="-20 -26 0 0" HorizontalAlignment="Left">
+ <StackPanel Margin="-20 -5 0 0" HorizontalAlignment="Left">
<TextBlock FontSize="9">
<Run Text="0"></Run>
<Run Foreground="Gray" FontSize="8" Text="m"></Run>
@@ -1109,7 +1224,7 @@
</materialDesign:PackIcon>
</StackPanel>
- <StackPanel Margin="0 -26 -30 0" HorizontalAlignment="Right">
+ <StackPanel Margin="0 -5 -20 0" HorizontalAlignment="Right">
<TextBlock FontSize="9">
<Run Text="{Binding SelectedJob.Length,Mode=OneWay}"></Run>
<Run Foreground="Gray" FontSize="8" Text="m"></Run>
@@ -1118,6 +1233,10 @@
</materialDesign:PackIcon>
</StackPanel>
+
+ <Border BorderBrush="Gainsboro" BorderThickness="1" VerticalAlignment="Bottom" Height="10">
+
+ </Border>
</Grid>
</Border>
</Grid>
@@ -1322,7 +1441,7 @@
</Border>
</Grid>
- <Grid Grid.ColumnSpan="3" Background="White">
+ <Grid Grid.ColumnSpan="3" Background="White" Visibility="Collapsed">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="RenderTransform">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
index 143280e66..e6f685535 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
@@ -128,5 +128,10 @@ namespace Tango.MachineStudio.Developer.Views
{
UpdateGradientBrushDisplay();
}
+
+ private void OnJobStartClick(object sender, RoutedEventArgs e)
+ {
+ runningJobBrushList.ItemsSource = jobBrushList.ItemsSource;
+ }
}
}