123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <UserControl x:Class="FurnaceUI.Views.Editors.RecipeSkipWaitCommandView"
- 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:local="clr-namespace:FurnaceUI.Views.Editors" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:cal="http://www.caliburn.org" xmlns:converter="clr-namespace:FurnaceUI.Converter"
- mc:Ignorable="d"
- Height="600" Width="740" FontFamily="Segoe">
- <UserControl.Resources>
- <converter:IsCheckShowStringConverter x:Key="isCheckShowStringConverter"/>
- <LinearGradientBrush x:Key="ToggleButton_BG_Color" EndPoint="0,0" StartPoint="0,1">
- <GradientStop Color="White" Offset="0"/>
- <GradientStop Color="White" Offset="0.9"/>
- <GradientStop Color="#FFD0D0D0" Offset="1"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ToggleButton_BD" Color="#FF284775"/>
- <SolidColorBrush x:Key="ToggleButton_BD_Shadow" Color="#FF284775"/>
- <SolidColorBrush x:Key="ToggleButton_BG_MouseOver" Color="#FF4FCBFF"/>
- <SolidColorBrush x:Key="ToggleButton_BG_Press" Color="#FF5A89D4"/>
- <SolidColorBrush x:Key="ToggleButton_BG_Unable" Color="#FFD2D2D2"/>
- <SolidColorBrush x:Key="ToggleButton_BD_Unable" Color="#FFF3F3F3"/>
- <SolidColorBrush x:Key="ToggleButton_BD_Shadow_Unable" Color="#FF9D9D9D"/>
- <SolidColorBrush x:Key="ToggleButton_BG_Checked" Color="#FFb8fff8"/>
- <SolidColorBrush x:Key="ToggleButton_BD_Checked" Color="#FFF3F3F3"/>
- <SolidColorBrush x:Key="ToggleButton_BD_Shadow_Checked" Color="#FF9D9D9D"/>
- <SolidColorBrush x:Key="TopFrame_BG" Color="Gray"/>
- <SolidColorBrush x:Key="TopFrame_BG2" Color="#FF688AB3"/>
- <Style TargetType="{x:Type ToggleButton}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
- <Setter Property="Background" Value="{StaticResource TopFrame_BG}"/>
- <Setter Property="BorderBrush" Value="Black"/>
- <Setter Property="BorderThickness" Value="2,2,0,0"/>
- <Setter Property="Foreground" Value="{DynamicResource FG_Black}"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="6,3"/>
- <Setter Property="MinWidth" Value="40"/>
- <Setter Property="MinHeight" Value="20"/>
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="Border.CornerRadius" Value="4"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border x:Name="BG" BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- CornerRadius="{TemplateBinding Border.CornerRadius}"
- BorderBrush="{TemplateBinding BorderBrush}"
- Background="{TemplateBinding Background}" Cursor="Hand">
- <Border x:Name="Inner_BD"
- BorderBrush="WhiteSmoke"
- BorderThickness="0,0,2,2" Margin="0,0,-2,-2" CornerRadius="3" Padding="5,1">
- <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
-
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
- </ContentPresenter>
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BG" Property="Background" Value="{StaticResource ToggleButton_BG_MouseOver}"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter TargetName="BG" Property="Background" Value="{StaticResource ToggleButton_BG_Press}"/>
- <Setter TargetName="BG" Property="Margin" Value="1"/>
- <Setter Property="FontSize" Value="13"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="BG" Property="Background" Value="{StaticResource ToggleButton_BG_Unable}"/>
- <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource ToggleButton_BD_Unable}"/>
- <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource ToggleButton_BD_Shadow_Unable}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="Inner_BD" Property="Background" Value="{StaticResource TopFrame_BG2}"/>
- <Setter TargetName="BG" Property="Background" Value="{StaticResource TopFrame_BG}"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource ToggleButton_BD}"/>
- <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource ToggleButton_BD_Unable}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="Inner_BD" Property="Background" Value="{StaticResource TopFrame_BG}"/>
- <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource ToggleButton_BD}"/>
- <Setter Property="FontSize" Value="23"/>
- <Setter Property="FontWeight" Value="Normal"/>
- <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource ToggleButton_BD}"/>
- <Setter Property="TextBlock.Foreground" TargetName="contentpresenter" Value="Black"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="80"/>
- </Grid.RowDefinitions>
- <DockPanel>
- <Border BorderThickness="1" BorderBrush="Gray" Margin="10">
- <StackPanel Visibility="{Binding IsStepSkipVisibility}">
- <TextBlock Text="Step Skip Wait Check Time" FontSize="20" Margin="4,10,0,0"/>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="4" >
- <ToggleButton Width="150" Height="35" Content="Step Skip" IsChecked="{Binding IsStepSkipIsChecked,UpdateSourceTrigger=Explicit}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="StepClick">
- <cal:Parameter Value="Skip"/>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ToggleButton>
- <TextBlock Width="200" Text="Step Skip Check Time" VerticalAlignment="Center" Margin="10,0,0,0" Visibility="{Binding IsStepSkipIsChecked, Converter={StaticResource BoolVisibilityConverter}}"/>
- <TextBox Width="150" Text="{Binding StepSkipValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsStepSkipIsChecked, Converter={StaticResource BoolVisibilityConverter}}" Tag="Number"/>
- <TextBlock Text="sec" VerticalAlignment="Center" Visibility="{Binding IsStepSkipIsChecked, Converter={StaticResource BoolVisibilityConverter}}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="4" Visibility="{Binding IsStepWaitVisibility}">
- <ToggleButton Width="150" Height="35" Content="Step Wait" IsChecked="{Binding IsStepWaitIsChecked,UpdateSourceTrigger=Explicit}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="StepClick">
- <cal:Parameter Value="Wait"/>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ToggleButton>
- <TextBlock Width="200" Text="Step Wait Check Time" VerticalAlignment="Center" Margin="10,0,0,0" Visibility="{Binding IsStepWaitIsChecked, Converter={StaticResource BoolVisibilityConverter}}"/>
- <TextBox Width="150" Text="{Binding StepWaitValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsStepWaitIsChecked, Converter={StaticResource BoolVisibilityConverter}}" Tag="Number"/>
- <TextBlock Text="sec" VerticalAlignment="Center" Visibility="{Binding IsStepWaitIsChecked, Converter={StaticResource BoolVisibilityConverter}}"/>
- </StackPanel>
- </StackPanel>
- </Border>
- </DockPanel>
- <Border Grid.Row="2">
- <Grid>
- <Canvas>
- <Button Content="Save" Canvas.Left="406" Canvas.Top="19" Width="130" Height="45" Style="{StaticResource CommandButton}" IsEnabled="{Binding IsEnable}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="TempSetSave">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="Close" Canvas.Left="556" Canvas.Top="19" Width="130" Height="45" Style="{StaticResource CommandButton}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="TempSetCancel">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Canvas>
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|