aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml
blob: 6f7cd0e32321f32a7d7b8a61dcd5141a99088273 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
    xmlns:realTimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF"
    xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
    xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls">

    <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />

    <Style TargetType="{x:Type local:LoadingPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:LoadingPanel}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">

                        <Grid>
                            <ContentPresenter Content="{TemplateBinding Content}" />

                            <Grid Background="#60FFFFFF" Visibility="{TemplateBinding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}">
                                <mahApps:ProgressRing IsActive="{TemplateBinding IsLoading}" />
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphLabelBackground" Opacity="0.7">
        <GradientStop Color="#252525"/>
        <GradientStop Color="#FF4E4E4E" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphLegendBackground" Opacity="0.7">
        <GradientStop Color="#FF848484"/>
        <GradientStop Color="#FF282828" Offset="1"/>
    </LinearGradientBrush>

    <!--Graph Label-->
    <Style x:Key="graphLabel" TargetType="Label">
        <Style.Setters>
            <Setter Property="IsHitTestVisible" Value="False"></Setter>
            <Setter Property="Margin" Value="-1 -1 0 0"></Setter>
            <Setter Property="HorizontalAlignment" Value="Left"></Setter>
            <Setter Property="VerticalAlignment" Value="Top"></Setter>
            <Setter Property="Padding" Value="0"></Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <Border Width="Auto" Padding="0 0 20 0" Height="25" BorderBrush="DodgerBlue" BorderThickness="1" CornerRadius="0 0 30 0" Background="{StaticResource graphLabelBackground}" >
                            <Label Margin="5 0 0 0"  HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="12" Content="{Binding}"></Label>
                        </Border>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>
    <!--Graph Label-->

    <Style TargetType="{x:Type local:WpfGraphControl}">
        <Setter Property="BorderThickness" Value="1"></Setter>
        <Setter Property="BorderBrush" Value="{DynamicResource GrayBrush300}"></Setter>
        <Setter Property="Padding" Value="20 20 30 20"></Setter>
        <Setter Property="FontSize" Value="11"></Setter>
        <Setter Property="Foreground" Value="DodgerBlue"></Setter>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" >
                    <GradientStop Color="Black"/>
                    <GradientStop Color="#FF333333" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:WpfGraphControl}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="5"
                            Padding="{TemplateBinding Padding}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="1*"/>
                                <RowDefinition Height="35"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="70"/>
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>

                            <Grid Grid.Column="1">
                                <realTimeGraphX:WpfGraphGridLines Controller="{TemplateBinding Controller}" Foreground="{DynamicResource GrayBrush300}" />
                                <realTimeGraphX:WpfGraphSurface x:Name="surface" Controller="{TemplateBinding Controller}" BorderThickness="1 0 0 1" BorderBrush="{TemplateBinding Foreground}" />

                                <Grid IsHitTestVisible="False" Visibility="{TemplateBinding GraphLabelVisibility}">
                                    <Label Style="{StaticResource graphLabel}">
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{TemplateBinding DisplayName}"></TextBlock>
                                            <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{TemplateBinding DisplayUnits}"></TextBlock>
                                        </StackPanel>
                                    </Label>
                                </Grid>
                            </Grid>

                            <realTimeGraphX:WpfGraphAxisControl Orientation="Vertical" Controller="{TemplateBinding Controller}" StringFormat="{TemplateBinding StringFormat}" />
                            <realTimeGraphX:WpfGraphAxisControl Orientation="Horizontal" Controller="{TemplateBinding Controller}" Grid.Column="1" Grid.Row="1" StringFormat="hh\:mm\:ss"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
</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}"> <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 ResetThreadLoadingCommand.Command}">RESET THREAD LOADING</touch:TouchButton> <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 StartThreadLoadingCommand}">THREAD LOADING WIZARD</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> <!--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>