Commit fa55cc08 authored by 潘栩锋's avatar 潘栩锋 🚴

修改 下吹温控面板4个灯的样式

parent f893d9ce
......@@ -64,9 +64,10 @@
<SolidColorBrush x:Key="Color_extinguish" Color="#FF888888"/>
<!--颜色 仪表板.数码管绿色 -->
<SolidColorBrush x:Key="SegGreenBrush" Color="#4f7333"/>
<!--<SolidColorBrush x:Key="SegGreenBrush" Color="#4f7333"/>-->
<SolidColorBrush x:Key="SegGreenBrush" Color="#00561f"/>
<!--颜色 仪表板.数码管红色 -->
<SolidColorBrush x:Key="SegOrangeBrush" Color="#FF005083"/>
<SolidColorBrush x:Key="SegOrangeBrush" Color="#005083"/>
<!--颜色 仪表板.数码管底色 -->
<SolidColorBrush x:Key="SegBgBrush" Color="#e9e9e9"/>
......@@ -74,7 +75,7 @@
<!--颜色 仪表板.绿灯 -->
<SolidColorBrush x:Key="LedGreenBrush" Color="#78b649"/>
<!--颜色 仪表板.红灯 -->
<SolidColorBrush x:Key="LedRedBrush" Color="#FFe44c63"/>
<SolidColorBrush x:Key="LedRedBrush" Color="#676767"/>
<!--颜色 仪表板.印刷字 -->
<SolidColorBrush x:Key="PrintBrush" Color="#FF464646"/>
......
......@@ -49,37 +49,6 @@
<ContentControl Grid.Row="5" ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[4]}" Margin="{StaticResource ControlMargin}"/>
<ContentControl Grid.Row="6" ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[5]}" Margin="{StaticResource ControlMargin}"/>
<ContentControl Grid.Row="7" ContentTemplate="{StaticResource TmTemplate}" Content="{Binding .}" Margin="{StaticResource ControlMargin}"/>
<!--<UniformGrid Columns="1" Grid.Row="1">
<UniformGrid.Resources>
<Style TargetType="ContentControl">
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="MinWidth" Value="150"/>
<Setter Property="MinHeight" Value="116"/>
</Style>
</UniformGrid.Resources>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly" >
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[0]}" Width="250" />
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[1]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[2]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[3]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[4]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[5]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TmTemplate}" Content="{Binding .}"/>
</Viewbox>
</UniformGrid>-->
</Grid>
</Button>
......
......@@ -53,6 +53,31 @@
</Setter>
</Style>
<!--温度控制器模板中的灯(字的背景色作为灯)例如Run灯 -->
<Style x:Key="LedStyle2" TargetType="{x:Type ToggleButton}">
<Setter Property="Foreground" Value="{StaticResource Color_background}"/>
<Setter Property="Margin" Value="1,0"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Border x:Name="border" Background="{StaticResource LedRedBrush}" CornerRadius="3">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="border" Property="Background" Value="{StaticResource LedGreenBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--温度控制器模板 UcTcSet.xaml是测试,用模板可以快50%-->
<DataTemplate x:Key="TcSetTemplate">
<Grid >
......@@ -76,33 +101,27 @@
Style="{StaticResource SegTextStyle}" Foreground="{StaticResource Color_text}" Background="{StaticResource Color_background2}"
Text="{Binding TempPV,StringFormat={}{0:0.#}}" />
</Grid>
<Grid Margin="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="SV" Margin="2" Style="{StaticResource Styles.Text.FieldHeader.Editable}"
<Grid Margin="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="SV" Margin="2" Style="{StaticResource Styles.Text.FieldHeader.Editable}"
Foreground="{StaticResource Color_title_activity}"
FontSize="{StaticResource FontSize_title}"/>
<TextBox Grid.Column="1"
<TextBox Grid.Column="1"
Style="{StaticResource SegInputStyle}"
Foreground="{StaticResource Color_text_activity}"
Background="{StaticResource Color_background2}"
Text="{Binding TempSVSet,StringFormat={}{0:0.#}}" />
</Grid>
<Grid Margin="2,2,2,5">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton Grid.Column="0" IsChecked="{Binding IsHeatingSet,Mode=OneWay}" Content="Run" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
<ToggleButton Grid.Column="1" IsChecked="{Binding IsHeating,Mode=OneWay}" Content="OT1" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
<ToggleButton Grid.Column="2" IsChecked="{Binding IsSelfAdjusting,Mode=OneWay}" Content="AT" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
<ToggleButton Grid.Column="3" IsChecked="{Binding IsCooling,Mode=OneWay}" Content="OT2" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
</Grid>
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}" HorizontalAlignment="Center" Margin="{StaticResource ControlMargin}"
</Grid>
<UniformGrid Margin="2,1" Columns="4">
<ToggleButton IsChecked="{Binding IsHeatingSet,Mode=OneWay}" Content="Run" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
<ToggleButton IsChecked="{Binding IsHeating,Mode=OneWay}" Content="OT1" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
<ToggleButton IsChecked="{Binding IsSelfAdjusting,Mode=OneWay}" Content="AT" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
<ToggleButton IsChecked="{Binding IsCooling,Mode=OneWay}" Content="OT2" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
</UniformGrid>
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}" HorizontalAlignment="Center" Margin="{StaticResource ControlMargin}"
OnLabel="运行" OnBrush="{StaticResource Color_on}"
OffLabel="停止" OffBrush="{StaticResource Color_off}"
IsChecked="{Binding IsHeatingSet}"/>
......@@ -192,11 +211,11 @@
Text="{Binding TempSV,StringFormat={}{0:0.#}}" />
</Grid>
<Rectangle Height="2" Fill="{StaticResource PrintBrush}"/>
<UniformGrid Margin="2,2,2,5" Columns="4">
<ToggleButton IsChecked="{Binding IsHeatingSet,Mode=OneWay}" Content="Run" IsEnabled="False" Style="{StaticResource LedStyle}"/>
<ToggleButton IsChecked="{Binding IsHeating,Mode=OneWay}" Content="OT1" IsEnabled="False" Style="{StaticResource LedStyle}"/>
<ToggleButton IsChecked="{Binding IsSelfAdjusting,Mode=OneWay}" Content="AT" IsEnabled="False" Style="{StaticResource LedStyle}"/>
<ToggleButton IsChecked="{Binding IsCooling,Mode=OneWay}" Content="OT2" IsEnabled="False" Style="{StaticResource LedStyle}"/>
<UniformGrid Margin="2" Columns="4">
<ToggleButton IsChecked="{Binding IsHeatingSet,Mode=OneWay}" Content="Run" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
<ToggleButton IsChecked="{Binding IsHeating,Mode=OneWay}" Content="OT1" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
<ToggleButton IsChecked="{Binding IsSelfAdjusting,Mode=OneWay}" Content="AT" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
<ToggleButton IsChecked="{Binding IsCooling,Mode=OneWay}" Content="OT2" IsEnabled="False" Style="{StaticResource LedStyle2}"/>
</UniformGrid>
</StackPanel>
<TextBlock Background="{StaticResource BrandBrush}" Grid.Row="1" Height="8" Text="8888888" FontWeight="Bold" Padding="1" FontSize="5" Foreground="{StaticResource PrintBrush}"/>
......
......@@ -55,7 +55,7 @@
<StackPanel Orientation="Horizontal" Grid.Column="1" Background="{StaticResource Color_badgeBg}">
<StackPanel Orientation="Horizontal" Margin="7,3">
<TextBlock Text="一牵" FontSize="30" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="一牵" FontSize="30" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="速度" FontSize="20" Foreground="{StaticResource Color_badgeText}"/>
</StackPanel>
</StackPanel>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FLY.DownBlowing.UI.Client.UnitTests">
<local:DownBlowingSystemServiceUt x:Key="downBlowingSystem"/>
</ResourceDictionary>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment