aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/AppBarItems/JobProgressAppBarItemView.xaml
blob: 0da22f49f1a1b37711ae354675a8f6ae2bad88b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<UserControl x:Class="Tango.PPC.Jobs.AppBarItems.JobProgressAppBarItemView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:local="clr-namespace:Tango.PPC.Jobs.AppBarItems"
             mc:Ignorable="d" 
             d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:JobProgressAppBarItem, IsDesignTimeCreatable=False}">
    <Grid>
        <touch:TouchButton Style="{StaticResource TangoFlatButton}" Command="{Binding PressedCommand}" Padding="0">
            <StackPanel VerticalAlignment="Center">
                <TextBlock Text="{Binding MachineProvider.MachineOperator.RunningJob.Name,FallbackValue='Job Name'}" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="Bold" TextTrimming="CharacterEllipsis"></TextBlock>
                <ProgressBar Maximum="{Binding MachineProvider.MachineOperator.RunningJobStatus.TotalProgressMinusSettingUp}" Value="{Binding MachineProvider.MachineOperator.RunningJobStatus.ProgressMinusSettingUp}" Margin="0 10 0 5" Background="{StaticResource TangoGrayBrush}" Height="5" Foreground="{StaticResource TangoPrimaryAccentBrush}" BorderThickness="0" />
                <DockPanel LastChildFill="False">
                    <TextBlock DockPanel.Dock="Left">
                                            <Run>Completed</Run>
                                            <Run Text="{Binding MachineProvider.MachineOperator.RunningJobStatus.ProgressMinusSettingUp,StringFormat=0}"></Run><Run>/</Run><Run Text="{Binding MachineProvider.MachineOperator.RunningJobStatus.TotalProgressMinusSettingUp,StringFormat=0}"></Run><Run>m</Run>
                    </TextBlock>

                    <TextBlock DockPanel.Dock="Right">
                                            <Run Text="{Binding MachineProvider.MachineOperator.RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=5}"></Run>
                                            <Run FontSize="16" Text="{Binding MachineProvider.MachineOperator.RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run>
                    </TextBlock>
                </DockPanel>
            </StackPanel>
        </touch:TouchButton>
    </Grid>
</UserControl>