diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-09-17 15:32:09 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-09-17 15:32:09 +0300 |
| commit | 936f105cf65f1efa7b27cea08080c183f2679568 (patch) | |
| tree | 3ded7b27200a993ec830019a4219997394b436d0 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml | |
| parent | 02263b893b1366b084cf1b2358920dc195cfac01 (diff) | |
| download | Tango-936f105cf65f1efa7b27cea08080c183f2679568.tar.gz Tango-936f105cf65f1efa7b27cea08080c183f2679568.zip | |
Added all segments progress to job status and machine studio running job.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml | 100 |
1 files changed, 94 insertions, 6 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index 11c60c1ef..fe04cead7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -14,15 +14,103 @@ <UserControl.Resources> <converters:DateTimeUTCToStringConverter x:Key="DateTimeUTCToStringConverter" /> </UserControl.Resources> - - <Grid> - <Grid Margin="40"> + + <Grid Margin="40"> + <Grid.RowDefinitions> + <RowDefinition Height="900*" MinHeight="50" /> + <RowDefinition Height="5"/> + <RowDefinition Height="743*" MinHeight="170"/> + </Grid.RowDefinitions> + + <Grid> <DockPanel> - <StackPanel Margin="0 20 0 0" Orientation="Horizontal" DockPanel.Dock="Top"> - <materialDesign:PackIcon Kind="Settings" Width="60" Height="60" /> - <TextBlock FontSize="30" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">Job Status</TextBlock> + <StackPanel Margin="0 0 0 0" Orientation="Horizontal" DockPanel.Dock="Top"> + <materialDesign:PackIcon Kind="Settings" Width="40" Height="40" /> + <TextBlock FontSize="30" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">Status</TextBlock> </StackPanel> + <DataGrid x:Name="gridSegments" SelectionMode="Single" SelectionChanged="DataGrid_SelectionChanged" SelectionUnit="FullRow" RowHeight="40" GridLinesVisibility="None" ItemsSource="{Binding RunningJobStatus.Segments}" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding RunningJobStatus.CurrentSegment}" Background="Transparent" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" IsReadOnly="True" AutoGenerateColumns="False"> + <DataGrid.RowStyle> + <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> + <Style.Triggers> + <Trigger Property="IsSelected" Value="True"> + <Setter Property="Foreground" Value="White"></Setter> + <Setter Property="Background"> + <Setter.Value> + <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> + <GradientStop Color="#FFFF7A7A"/> + <GradientStop Color="Transparent" Offset="1"/> + </LinearGradientBrush> + </Setter.Value> + </Setter> + <Setter Property="BorderThickness" Value="1"></Setter> + <Setter Property="BorderBrush" Value="White"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </DataGrid.RowStyle> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + <Style.Triggers> + <Trigger Property="IsSelected" Value="True"> + <Setter Property="Background" Value="Transparent"></Setter> + <Setter Property="Foreground" Value="White"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTextColumn Width="Auto" Header="#" Binding="{Binding SegmentIndex}" /> + <DataGridTemplateColumn Header="Status"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <materialDesign:PackIcon VerticalAlignment="Center" HorizontalAlignment="Center"> + <materialDesign:PackIcon.Style> + <Style TargetType="materialDesign:PackIcon"> + <Setter Property="Kind" Value="PauseCircle"></Setter> + <Setter Property="Foreground" Value="Gray"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Started}" Value="True"> + <Setter Property="Kind" Value="ClockFast"></Setter> + <Setter Property="Foreground" Value="White"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Completed}" Value="True"> + <Setter Property="Kind" Value="CheckCircle"></Setter> + <Setter Property="Foreground" Value="#29B31D"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </materialDesign:PackIcon.Style> + </materialDesign:PackIcon> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTemplateColumn> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Rectangle Width="80" Fill="{Binding SegmentBrush}" Stroke="Gray"></Rectangle> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTextColumn Header="Name" Binding="{Binding Name}" /> + <DataGridTextColumn Header="Length" Binding="{Binding Length,StringFormat={}{0:F2} m}" /> + <DataGridTextColumn Header="Progress" Binding="{Binding Progress,StringFormat={}{0:F2} m}" /> + <DataGridTextColumn Header="Estimated Duration" Binding="{Binding EstimatedDuration,StringFormat='hh\\:mm\\:ss'}" /> + <DataGridTextColumn Header="Remaining Time" Binding="{Binding RemainingTime,StringFormat='hh\\:mm\\:ss'}" /> + </DataGrid.Columns> + </DataGrid> + </DockPanel> + </Grid> + <GridSplitter Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" Background="Black" /> + <Grid Grid.Row="2" Margin="0 40 0 0"> + <DockPanel> + <StackPanel Margin="0 0 0 0" Orientation="Horizontal" DockPanel.Dock="Top"> + <materialDesign:PackIcon Kind="Settings" Width="40" Height="40" /> + <TextBlock FontSize="30" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">Events</TextBlock> + </StackPanel> <Grid DockPanel.Dock="Bottom" Height="40"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0"> <Button Command="{Binding BackToJobCommand}" Style="{StaticResource MaterialDesignFlatButton}" FontSize="16"> |
