aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
blob: d00b4abb21118552b5b2b85573b7543321bd6268 (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
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 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.RemoteDesktop.Quantization;

namespace Tango.RemoteDesktop.Encoders
{
    public class Png8BitEncoder : FrameEncoder
    {
        public Png8BitEncoder(IFrame frame) : base(frame)
        {
        }

        public override MemoryStream ToStream()
        {
            MemoryStream ms = new MemoryStream();
            var quantizer = new OctreeQuantizer(256, true);
            var quantized = quantizer.Quantize(Frame.ToBitmap());

            ImageCodecInfo icf = GetEncoder(ImageFormat.Png);
            EncoderParameters parms = new EncoderParameters(1);
            EncoderParameter parm = new EncoderParameter(System.Drawing.Imaging.Encoder.ColorDepth, 8);
            parms.Param[0] = parm;
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.PPC.Maintenance.Views.MaintenanceView"
             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:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels"
             xmlns:global="clr-namespace:Tango.PPC.Maintenance"
             xmlns:ifs="clr-namespace:Tango.PMR.IFS;assembly=Tango.PMR"
             xmlns:arr="clr-namespace:System.Collections;assembly=mscorlib"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:localConverters="clr-namespace:Tango.PPC.Maintenance.Converters"
             xmlns:localControls="clr-namespace:Tango.PPC.Maintenance.Controls"
             xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
             xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views"
             mc:Ignorable="d" 
             d:DesignHeight="1800" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MaintenanceViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MaintenanceViewVM}">

    <UserControl.Resources>

        <localConverters:StringToFirstLetterConverter x:Key="StringToFirstLetterConverter" />
        <localConverters:MidTankLevelToElementHeightConverter x:Key="MidTankLevelToElementHeightConverter" />
        <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter" />
        <localConverters:LiquidTypeToShortNameConverter x:Key="LiquidTypeToShortNameConverter"/>

        <Style TargetType="FrameworkElement" x:Key="Level1Container">
            <Setter Property="Margin" Value="20 15 60 15"></Setter>
        </Style>
        <Style TargetType="FrameworkElement" x:Key="Level2Container">
            <Setter Property="Margin" Value="80 30 60 0"></Setter>
        </Style>
        <Style TargetType="FrameworkElement" x:Key="Level2ContainerExtraMargin">
            <Setter Property="Margin" Value="80 40 60 0"></Setter>
        </Style>

        <DataTemplate x:Key="LiquidBox">
            <DockPanel>
                <TextBlock DockPanel.Dock="Top" Text="{Binding IDSPack.LiquidType,Converter={StaticResource LiquidTypeToShortNameConverter}}" HorizontalAlignment="Center"></TextBlock>
                <Grid MaxWidth="20" Margin="1 0">
                    <touch:TouchIcon Icon="MapMarkerSolid" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 10" Foreground ="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}">
                        <touch:TouchIcon.Style>
                            <Style TargetType="touch:TouchIcon">
                                <Setter Property="Visibility" Value="Hidden"></Setter>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsLow}" Value="True">
                                        <Setter Property="Visibility" Value="Visible"></Setter>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding IsEmpty}" Value="True">
                                        <DataTrigger.EnterActions>
                                            <BeginStoryboard Name="blinkDrop">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever">
                                                        <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                        <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </DataTrigger.EnterActions>
                                        <DataTrigger.ExitActions>
                                            <RemoveStoryboard BeginStoryboardName="blinkDrop" />
                                        </DataTrigger.ExitActions>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </touch:TouchIcon.Style>
                    </touch:TouchIcon>
                    <Border BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}" CornerRadius="3" ClipToBounds="True" x:Name="pathBorder">
                        <Canvas Width="30" >
                            <Path Panel.ZIndex="1" VerticalAlignment="Bottom"  ClipToBounds="True" MinHeight="2" Data="M0,0 C2,0 8.9,-1.1705073 11.3,-4.6 14.5,-7.7 15.5,-8 18.7,-10.8 21.7,-13.16 23.3,-14.5 28,-15.6 28,-13.7 28,80 28,100 L0,100 z" Height="90"  Width="29" Stretch="Fill" 
                                                                           Canvas.Left="0" Fill="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}"  Margin="0 -14 0 0" >

                                <Path.Style>
                                    <Style>
                                        <Setter Property="Canvas.Top" >
                                            <Setter.Value>
                                                <MultiBinding Converter="{StaticResource MidTankLevelToElementHeightConverter}">
                                                    <Binding ElementName="pathBorder" Path="ActualHeight" />
                                                    <Binding Path="Level" />
                                                </MultiBinding>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Path.Style>
                            </Path>
                        </Canvas>
                    </Border>
                </Grid>
            </DockPanel>
        </DataTemplate>
    </UserControl.Resources>

    <Grid Background="{StaticResource TangoMidBackgroundBrush}" IsEnabled="{Binding IsFree}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>

        <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
            <Border.Effect>
                <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
            </Border.Effect>
            <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Maintenance</TextBlock>
        </Border>

        <Grid Grid.Row="1">
            <touch:LightTouchScrollViewer>
                <StackPanel Margin="10 60 10 0">

                    <!--STATUS-->
                    <touch:TouchDropShadowBorder Padding="0 0 0 50">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center"  Style="{StaticResource Level1Container}">
                                <Image Source="../Images/status.png" />
                                <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Current Status</TextBlock>
                            </StackPanel>

                            <StackPanel Margin="20 40 40 0">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="180" />
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="180" />
                                        <ColumnDefinition Width="100" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="100" />
                                        <RowDefinition Height="28" />
                                    </Grid.RowDefinitions>

                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                                        <Image Stretch="None">
                                            <Image.Style>
                                                <Style TargetType="Image">
                                                    <Setter Property="Source" Value="../Images/temperature-green.png"></Setter>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding OverallTemperature.IsWarning}" Value="True">
                                                            <Setter Property="Source" Value="../Images/temperature-yellow.png"></Setter>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding OverallTemperature.IsError}" Value="True">
                                                            <Setter Property="Source" Value="../Images/temperature-red.png"></Setter>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Image.Style>
                                        </Image>
                                        <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">
                                            <Run Text="{Binding OverallTemperature.Temperature,StringFormat='0',Mode=OneWay}"></Run>
                                            <Run>º</Run>
                                        </TextBlock>
                                    </StackPanel>

                                    <Grid Grid.Column="1" Margin="0 0 0 10">
                                        <ItemsControl ItemsSource="{Binding MidTankLevels}" ItemTemplate="{StaticResource LiquidBox}">
                                            <ItemsControl.ItemsPanel>
                                                <ItemsPanelTemplate>
                                                    <UniformGrid Rows="1" IsItemsHost="True"></UniformGrid>
                                                </ItemsPanelTemplate>
                                            </ItemsControl.ItemsPanel>
                                        </ItemsControl>
                                    </Grid>

                                    <Image Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15" RenderOptions.BitmapScalingMode="Fant">
                                        <Image.Style>
                                            <Style TargetType="Image">
                                                <Setter Property="Source" Value="../Images/cone-empty.png"></Setter>
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding SpoolState}" Value="Present">
                                                        <Setter Property="Source" Value="../Images/cone-full.png"></Setter>
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Image.Style>
                                    </Image>

                                    <Grid Grid.Column="3">
                                        <ItemsControl ItemsSource="{Binding WasteStates}">
                                            <ItemsControl.ItemsPanel>
                                                <ItemsPanelTemplate>
                                                    <UniformGrid Columns="2" />
                                                </ItemsPanelTemplate>
                                            </ItemsControl.ItemsPanel>
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate>
                                                    <Image Stretch="None" HorizontalAlignment="Right">
                                                        <Image.Style>
                                                            <Style TargetType="Image">
                                                                <Setter Property="Source" Value="../Images/Waste/absent.png"></Setter>
                                                                <Style.Triggers>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Absent}">
                                                                        <Setter Property="Source" Value="../Images/Waste/absent.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Present}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_empty_right.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Empty}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_empty_right.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Full}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_full_right.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Emptying}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_full_right.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Inserted}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_empty_right.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.EmptyingCompleted}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_empty_right.png"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding State}" Value="{x:Static ifs:CartridgeState.Error}">
                                                                        <Setter Property="Source" Value="../Images/Waste/present_empty_error.png"></Setter>
                                                                    </DataTrigger>
                                                                </Style.Triggers>
                                                            </Style>
                                                        </Image.Style>
                                                    </Image>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </Grid>

                                    <TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Temperature</TextBlock>
                                    <TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Inks</TextBlock>
                                    <TextBlock Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Collecting Cone</TextBlock>
                                    <TextBlock Margin="20 0 0 0" Grid.Column="3" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Waste</TextBlock>
                                </Grid>
                            </StackPanel>
                        </StackPanel>
                    </touch:TouchDropShadowBorder>

                    <!--ACTIONS-->
                    <touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50" MinHeight="330">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center"  Style="{StaticResource Level1Container}">
                                <Image Source="../Images/action.png" />
                                <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Actions</TextBlock>
                            </StackPanel>

                            <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
                                <UniformGrid Columns="2" Margin="0 0">

                                    <localControls:StateTouchButton Command="{Binding OpenCloseLeftLeadingWheelsCommand.Command}" SelectedState="{Binding OpenCloseLeftLeadingWheelsCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">
                                        <localControls:ButtonState Value="Closed" Content="OPEN LEFT LEADING WHEELS" />
                                        <localControls:ButtonState Value="Opened" Content="CLOSE LEFT LEADING WHEELS" />
                                    </localControls:StateTouchButton>

                                    <localControls:StateTouchButton Command="{Binding OpenCloseRightLeadingWheelsCommand.Command}" SelectedState="{Binding OpenCloseRightLeadingWheelsCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">
                                        <localControls:ButtonState Value="Closed" Content="OPEN RIGHT LEADING WHEELS" />
                                        <localControls:ButtonState Value="Opened" Content="CLOSE RIGHT LEADING WHEELS" />
                                    </localControls:StateTouchButton>

                                    <localControls:StateTouchButton Command="{Binding OpenCloseDyeingHeadCommand.Command}" SelectedState="{Binding OpenCloseDyeingHeadCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Visibility="{Binding MachineProvider.Machine.MachineHeadType,Converter={StaticResource IsToStringEqualToVisibilityConverter},ConverterParameter='Flat'}">
                                        <localControls:ButtonState Value="Closed" Content="OPEN DYEING HEAD LID" />
                                        <localControls:ButtonState Value="Opened" Content="CLOSE DYEING HEAD LID" />
                                    </localControls:StateTouchButton>

                                    <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding HeadCleaningCommand}">RUN HEAD CLEANING</touch:TouchButton>

                                    <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding DispenseCleanerLiquidCommand}">DISPENSE CLEANING LIQUID</touch:TouchButton>

                                    <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ExportLogsCommand}" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}">EXPORT SYSTEM LOGS</touch:TouchButton>
                                </UniformGrid>
                            </StackPanel>
                        </StackPanel>
                    </touch:TouchDropShadowBorder>

                    <!--THREAD LOADING-->
                    <touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50" MinHeight="330">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center"  Style="{StaticResource Level1Container}">
                                <Image Source="../Images/thread_loading.png" Width="48" RenderOptions.BitmapScalingMode="Fant" />
                                <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Thread Loading</TextBlock>
                            </StackPanel>

                            <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
                                <UniformGrid Columns="1" Margin="0 0" HorizontalAlignment="Left">
                                    <StackPanel Margin="20">
                                        <touch:TouchButton Width="280" HorizontalAlignment="Left" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartThreadBreakCommand}">THREAD BREAK WIZARD</touch:TouchButton>
                                        <DockPanel Margin="15 10 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Left">
                                            <touch:TouchIcon Icon="InformationOutline" Width="14" Height="18" VerticalAlignment="Center" />
                                            <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoSmallFontSize}">This wizard will help you resolve thread breaking issues</TextBlock>
                                        </DockPanel>
                                    </StackPanel>

                                    <StackPanel Margin="20">
                                        <touch:TouchButton Width="280" HorizontalAlignment="Left" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartThreadLoadingCommand}">THREAD LOADING WIZARD</touch:TouchButton>
                                        <DockPanel Margin="15 10 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Left">
                                            <touch:TouchIcon Icon="InformationOutline" Width="14" Height="18" VerticalAlignment="Center" />
                                            <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoSmallFontSize}">This wizard will help you load a new thread in to the system</TextBlock>
                                        </DockPanel>
                                    </StackPanel>

                                    <touch:TouchButton Width="280" HorizontalAlignment="Left" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ResetThreadLoadingCommand.Command}">RESET THREAD LOADING</touch:TouchButton>
                                </UniformGrid>
                            </StackPanel>
                        </StackPanel>
                    </touch:TouchDropShadowBorder>

                    <!--GUIDES-->
                    <touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center"  Style="{StaticResource Level1Container}">
                                <Image Source="../Images/guides.png" />
                                <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Guides</TextBlock>
                            </StackPanel>

                            <StackPanel Margin="65 10 0 0">
                                <ItemsControl ItemsSource="{Binding Guides}">
                                    <ItemsControl.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <UniformGrid Columns="2" IsItemsHost="True" />
                                        </ItemsPanelTemplate>
                                    </ItemsControl.ItemsPanel>
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenGuideCommand}" CommandParameter="{Binding}" Padding="20" FontSize="{StaticResource TangoTitleFontSize}" Style="{StaticResource TangoLinkButton}" HorizontalAlignment="Left">
                                                <TextBlock Text="{Binding Name}"></TextBlock>
                                            </touch:TouchButton>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </StackPanel>
                        </StackPanel>
                    </touch:TouchDropShadowBorder>

                    <!--JOB RUNS-->
                    <StackPanel Margin="0 20 0 20" TextElement.FontSize="{StaticResource TangoTitleFontSize}" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                            <TextBlock FontWeight="SemiBold">Total Dyeing Time:</TextBlock>
                            <TextBlock Margin="10 0 0 0" Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center">
                            <TextBlock FontWeight="SemiBold">Total Dyed Length:</TextBlock>
                            <TextBlock Margin="10 0 0 0" Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </touch:LightTouchScrollViewer>
        </Grid>
    </Grid>
</UserControl>