aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
blob: 68cd65ad488a14b6904a059ea32d3cd758b6ce4d (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
using MahApps.Metro.Controls;
using MaterialDesignThemes.Wpf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Tango.MachineStudio.UI.Notifications
{
    /// <summary>
    /// Interaction logic for TextInputBoxWindow.xaml
    /// </summary>
    public partial class TextInputBoxWindow : Window
    {
        public TextInputBoxWindow()
        {
            InitializeComponent();
            this.Loaded += TextInputBoxWindow_Loaded;

            ContentRendered += TextInputBoxWindow_ContentRendered;
        }

        private void TextInputBoxWindow_ContentRendered(object sender, EventArgs e)
        {
            txtText.Focus();
            txtText.SelectAll();
        }

        private void TextInputBoxWindow_Loaded(object sender, RoutedEventArgs e)
        {
            DoubleAnimation ani = new DoubleAnimation();
            ani.To = 1;
            ani.Duration = TimeSpan.FromSeconds(0.5);
            this.BeginAnimation(Window.OpacityProperty, ani);
        }

        public String Hint
        {
            get { return (String)GetValue(HintProperty); }
            set { SetValue(HintProperty, value); }
        }
        public static readonly DependencyProperty HintProperty =
            DependencyProperty.Register("Hint", typeof(String), typeof(TextInputBoxWindow), new PropertyMetadata(null));



        public String Response
        {
            get { return (String)GetValue(ResponseProperty); }
            set { SetValue(ResponseProperty, value); }
        }
        public static readonly DependencyProperty ResponseProperty =
            DependencyProperty.Register("Response", typeof(String), typeof(TextInputBoxWindow), new PropertyMetadata(null));



        public String Message
        {
            get { return (String)GetValue(MessageProperty); }
            pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<UserControl x:Class="Tango.MachineStudio.Developer.Views.MainView"
             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:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:dispensing="clr-namespace:Tango.BL.Dispensing;assembly=Tango.BL"
             xmlns:localConverters="clr-namespace:Tango.MachineStudio.Developer.Converters"
             xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
             xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
             mc:Ignorable="d" 
             d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <UserControl.Resources>
        <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
        <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
        <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
        <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter"></converters:NullObjectToBooleanC
nverters:SmallerThanToBooleanConverter> <localConverters:BrushStopToColorConverter x:Key="BrushStopToColorConverter" /> <localConverters:BrushStopCMYKToColorConverter x:Key="BrushStopCMYKToColorConverter" /> <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" /> <localConverters:SegmentToBrushConverter x:Key="SegmentToBrushConverter" /> <localConverters:SegmentToBrushConverterMulti x:Key="SegmentToBrushConverterMulti" /> <localConverters:ObjectsNotEqualToBooleanConveter x:Key="ObjectsNotEqualToBooleanConveter" /> <localConverters:JobProgressToPositionConverter x:Key="JobProgressToPositionConverter" /> <localConverters:BrushStopToOffsetValueConverter x:Key="BrushStopToOffsetValueConverter" /> <converters:StringEllipsisConverter x:Key="StringEllipsisConverter" /> <converters:IsNotConverter x:Key="IsNotConverter" /> <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" /> <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" /> <SolidColorBrush x:Key="SideBarBackground" Color="White"> </SolidColorBrush> <Color x:Key="dummyColor">Transparent</Color> <ObjectDataProvider x:Key="dispenserDivisions" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> <ObjectDataProvider.MethodParameters> <x:Type TypeName="dispensing:DispenserStepDivisions"/> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> </UserControl.Resources> <Grid> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="1*" /> </Grid.RowDefinitions> <StackPanel> <Grid Background="#202020" TextElement.Foreground="Silver"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> <Setter.Value> <ScaleTransform ScaleX="1" ScaleY="0" /> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding ShowJobStatus}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="1" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="0" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Border BorderBrush="#404040" BorderThickness="0 0 0 1" Padding="20"> <Grid> <DockPanel> <Grid DockPanel.Dock="Left" MinWidth="190" VerticalAlignment="Center" Margin="0 0 0 0"> <StackPanel Orientation="Vertical" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> <ProgressBar Foreground="#FF6464" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" /> <TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontStyle="Italic" FontWeight="DemiBold" Foreground="#FF6464" TextWrapping="Wrap"> <Run Text="Running '"></Run> <Run Text="{Binding RunningJob.Name}"></Run> <Run Text="'..."></Run> </TextBlock> </StackPanel> </Grid> <StackPanel DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 20 0 0"> <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center" FontSize="30" FontFamily="{StaticResource digital-7}" Margin="0 0 40 0" Foreground="#FF6464" Width="100" Text="{Binding RunningJobStatus.RemainingTime,StringFormat=hh\\:mm\\:ss}"></TextBlock> <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> </StackPanel> <Grid> <Grid> <Border Margin="0 10 0 0" VerticalAlignment="Bottom" Width="1200" BorderBrush="#404040" BorderThickness="0" ClipToBounds="False"> <Grid ClipToBounds="False" > <ItemsControl ClipToBounds="False" x:Name="runningJobBrushList" ItemsSource="{Binding RunningJobStatus.CurrentUnitSegments}" Margin="0 0 60 0"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Grid ClipToBounds="False"> <Grid.ToolTip> <ToolTip Background="White" Padding="0" Visibility="{Binding IsInterSegment,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <Border BorderThickness="1" BorderBrush="#202020" CornerRadius="3" Padding="5"> <StackPanel Background="White"> <ItemsControl ItemsSource="{Binding BrushStops[0].LiquidVolumes}" VerticalAlignment="Center"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0"> <ContentControl.Foreground> <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> </ContentControl.Foreground> <TextBlock Foreground="#202020" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Volume,StringFormat=0.00}"></TextBlock> </ContentControl> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <DataGrid Margin="0 10 0 0" SelectedIndex="-1" IsReadOnly="True" ItemsSource="{Binding BrushStops[0].LiquidVolumes}" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" Background="Transparent" SelectionUnit="FullRow"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> </Style> </DataGrid.CellStyle> <DataGrid.Columns> <DataGridTemplateColumn Header="IDS PACK"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Grid x:Name="t0"> <Polygon x:Name="t1" Points="0,0 15,0 0,15 0,0" Margin="-15 -11 0 0"> <Polygon.Fill> <SolidColorBrush x:Name="t2" Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter},FallbackValue={StaticResource dummyColor}}" /> </Polygon.Fill> </Polygon> <TextBlock FontWeight="SemiBold" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}"></TextBlock> </Grid> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="D/F"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding IdsPack.DispenserType.NlPerPulse,StringFormat='0.0'}"></Run> <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="STEP"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> <Setter Property="Background" Value="#ECECEC"></Setter> </Style> </ComboBox.ItemContainerStyle> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="MAX NL / CM"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding LiquidMaxNanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="VOLUME"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding Volume,StringFormat='0.0'}"></Run> <Run Text="%" Foreground="Gray"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="FORMULA"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding IdsPack.IdsPackFormula.Name}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="NL / CM"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="NL / SEC"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTemplateColumn Header="PULSE / SEC"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Label VerticalAlignment="Center"> <Label.Style> <Style TargetType="Label"> <Setter Property="Content"> <Setter.Value> <TextBlock> <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> </TextBlock> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding DispenserStepDivision}" Value="{x:Static dispensing:DispenserStepDivisions.Auto}"> <Setter Property="Content" Value="Auto"></Setter> </DataTrigger> <DataTrigger Binding="{Binding DispenserStepDivision,Converter={StaticResource IsNotConverter},ConverterParameter={x:Static dispensing:DispenserStepDivisions.Auto}}" Value="True"> <Setter Property="Content"> <Setter.Value> <TextBlock> <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> </TextBlock> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </Label.Style> </Label> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid> </StackPanel> </Border> </ToolTip> </Grid.ToolTip> <Grid.Width> <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJobStatus.CurrentUnitTotalProgress"></Binding> <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> <Binding Path="Length"></Binding> </MultiBinding> </Grid.Width> <StackPanel Margin="0 0 0 0" ClipToBounds="False"> <StackPanel Margin="0 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center"> <Canvas Height="19"> <TextBlock Canvas.Top="0" Canvas.Left="-7" Margin="0 0 0 0" FontSize="10" HorizontalAlignment="Right"> <Run Text="{Binding Length,Mode=OneWay,StringFormat=0}"></Run> <Run FontSize="7" Text="m"></Run> </TextBlock> </Canvas> <materialDesign:PackIcon HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="12" Height="12"> <materialDesign:PackIcon.RenderTransform> <RotateTransform Angle="180" /> </materialDesign:PackIcon.RenderTransform> </materialDesign:PackIcon> </StackPanel> <Rectangle Height="30" Margin="0 10 0 0" VerticalAlignment="Center"> <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> <Canvas Height="30" HorizontalAlignment="Center" Width="80"> <Label Padding="0" Margin="0"> <Label.Style> <Style TargetType="Label"> <Setter Property="Content" Value="{x:Null}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding Started}" Value="True"> <Setter Property="Content"> <Setter.Value> <TextBlock Text="{Binding RemainingTime,StringFormat=hh\\:mm\\:ss}" Foreground="#FF6464" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Margin="10" FontSize="20"></TextBlock> </Setter.Value> </Setter> </DataTrigger> <DataTrigger Binding="{Binding Completed}" Value="True"> <Setter Property="Content"> <Setter.Value> <materialDesign:PackIcon Margin="30 10 0 0" HorizontalAlignment="Center" Width="24" Height="24" Kind="Check" Foreground="#47FF00" /> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </Label.Style> </Label> </Canvas> </StackPanel> <Rectangle HorizontalAlignment="Right" Stroke="White" Margin="0 35 0 25" ></Rectangle> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <StackPanel Margin="-40 -5 0 0" HorizontalAlignment="Left"> <TextBlock FontSize="14"> <Run Text="0"></Run> <Run FontSize="13" Text="m"></Run> </TextBlock> <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="20" Height="20"> </materialDesign:PackIcon> </StackPanel> <StackPanel Margin="0 -5 -70 0" HorizontalAlignment="Right"> <TextBlock FontSize="14"> <Run Text="{Binding RunningJobStatus.CurrentUnitTotalProgress,Mode=OneWay,StringFormat=N2}"></Run> <Run FontSize="13" Text="m"></Run> <Run></Run> <Run Foreground="#FF6464">x</Run><Run Foreground="#FF6464" FontSize="16" FontWeight="SemiBold" Text="{Binding RunningJobStatus.RemainingUnits}"></Run> </TextBlock> <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="20" Height="20"> </materialDesign:PackIcon> </StackPanel> <Border BorderBrush="#404040" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 60 0"> </Border> <Canvas x:Name="jobProgressCanvas" Width="{Binding ElementName=runningJobBrushList,Path=ActualWidth}" HorizontalAlignment="Left"> <Grid Canvas.Top="0"> <Canvas.Left> <MultiBinding Converter="{StaticResource JobProgressToPositionConverter}"> <Binding Path="RunningJobStatus.CurrentUnitTotalProgress" /> <Binding Path="RunningJobStatus.CurrentUnitProgress" /> <Binding ElementName="jobProgressCanvas" Path="ActualWidth" /> </MultiBinding> </Canvas.Left> <materialDesign:PackIcon Kind="MapMarker" Foreground="#FF6464" Width="35" Height="35" Margin="-17 0 0 0" /> <TextBlock Margin="-11 -23 0 0" FontSize="16" Foreground="#FF6464" VerticalAlignment="Top" Height="18" Text="{Binding RunningJobStatus.Progress,StringFormat=0.0}"></TextBlock> </Grid> </Canvas> </Grid> </Border> </Grid> </Grid> </DockPanel> <TextBlock Visibility="{Binding RunningJobStatus.IsFinalizing,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="-170 0 0 0" Background="#202020" FontSize="14" Height="30" Foreground="#FF6D6D">Finalizing...</TextBlock> </Grid> </Border> <ProgressBar IsIndeterminate="True" VerticalAlignment="Bottom" Height="3" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"></ProgressBar> </Grid> <Grid Background="#C1FFC7"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> <Setter.Value> <ScaleTransform ScaleX="1" ScaleY="0" /> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding IsJobCompleted}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="1" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="0" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Check" Width="32" Height="32" VerticalAlignment="Center" /> <TextBlock VerticalAlignment="Center" FontSize="16" FontWeight="SemiBold" Margin="10 0 0 0" FontStyle="Italic">Job Completed Successfully</TextBlock> </StackPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <Button Height="20" Padding="0" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> <Grid> </Grid> </DockPanel> </Border> </Grid> <Grid Background="#FF8888"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> <Setter.Value> <ScaleTransform ScaleX="1" ScaleY="0" /> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding IsJobFailed}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="1" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="0" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Alert" Width="32" Height="32" VerticalAlignment="Center" /> <TextBlock VerticalAlignment="Center" FontSize="16" FontWeight="SemiBold" Margin="10 0 0 0" FontStyle="Italic">Job Failed To Complete</TextBlock> </StackPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <!--<Button Height="40" Width="170" Command="{Binding ViewResultsCommand}" Background="#303030" BorderBrush="#202020"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Kind="ChartLine" /> <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">RESULTS</TextBlock> </StackPanel> </Button>--> <Button Padding="0" Height="20" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> <Grid> </Grid> </DockPanel> </Border> </Grid> <Grid Background="#FFE388"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> <Setter.Value> <ScaleTransform ScaleX="1" ScaleY="0" /> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding IsJobCanceled}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="1" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="0" Duration="00:00:0.3" /> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Alert" Width="32" Height="32" VerticalAlignment="Center" /> <TextBlock VerticalAlignment="Center" FontSize="16" FontWeight="SemiBold" Margin="10 0 0 0" FontStyle="Italic">Job Aborted By User</TextBlock> </StackPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <Button Padding="0" Height="20" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> <Grid> </Grid> </DockPanel> </Border> </Grid> </StackPanel> <Grid Grid.Row="1"> <controls:NavigationControl x:Name="NavigationControl" TransitionType="Slide" KeepElementsAttached="True"> <local:MachineJobSelectionView controls:NavigationControl.NavigationName="MachineJobSelectionView" /> <local:JobView controls:NavigationControl.NavigationName="JobView" /> <local:RunningJobView controls:NavigationControl.NavigationName="RunningJobView" /> </controls:NavigationControl> </Grid> </Grid> </Grid> </UserControl>