Browse Source

增加wifi 样式

样式分支
fyf 2 years ago
parent
commit
af87d9519a
5 changed files with 42 additions and 0 deletions
  1. +4
    -0
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  2. BIN
     
  3. BIN
     
  4. +32
    -0
      BPASmartClient.CustomResource/Themes/MyStyle.xaml
  5. +6
    -0
      BPASmartClient/MainWindow.xaml

+ 4
- 0
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj View File

@@ -48,6 +48,8 @@
<None Remove="Image\个人信息.png" />
<None Remove="Image\内部.png" />
<None Remove="Image\告警.png" />
<None Remove="Image\告警\Wifi_NO.ico" />
<None Remove="Image\告警\Wifi_OK.ico" />
<None Remove="Image\告警\告警.png" />
<None Remove="Image\告警\成功0ecb74.png" />
<None Remove="Image\告警\报错.png" />
@@ -143,6 +145,8 @@
</ItemGroup>

<ItemGroup>
<Resource Include="Image\告警\Wifi_NO.ico" />
<Resource Include="Image\告警\Wifi_OK.ico" />
<Resource Include="Image\顶部切图\Button_No.png" />
<Resource Include="Image\顶部切图\Button_Select.png" />
<Resource Include="Image\顶部切图\Top_L.png" />


BIN
View File


BIN
View File


+ 32
- 0
BPASmartClient.CustomResource/Themes/MyStyle.xaml View File

@@ -54,6 +54,38 @@
</Setter>
</Style.Setters>
</Style>

<Style x:Key="StatusBtnStyle网络连接状态" TargetType="ToggleButton">
<Style.Setters>
<Setter Property="Width" Value="20"></Setter>
<Setter Property="Height" Value="25"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="IsChecked" Value="{Binding IsCheck,Mode=TwoWay}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid Cursor="Hand">
<Image x:Name="image1" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Source="/BPASmartClient.CustomResource;component/Image/告警/Wifi_NO.ico" Panel.ZIndex="0" ></Image>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/告警/Wifi_OK.ico"></Setter>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsCheck}" Value="true"></Condition>
<Condition Binding="{Binding IsAlarm}" Value="true"></Condition>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/告警/Wifi_OK.ico"></Setter>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
<!--#endregion-->
<!--#region Image -->


+ 6
- 0
BPASmartClient/MainWindow.xaml View File

@@ -78,6 +78,12 @@
</Grid>

<StackPanel Grid.Column="4" Orientation="Horizontal" HorizontalAlignment="Right" Height="50" VerticalAlignment="Top">
<Border Style="{DynamicResource border竖线}" />
<StackPanel Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center" >
<TextBlock FontSize="12">网</TextBlock>
<TextBlock FontSize="12">络</TextBlock>
</StackPanel>
<ToggleButton Margin="5" VerticalAlignment="Center" ToolTip="网络连接状态" HorizontalAlignment="Center" Style="{DynamicResource StatusBtnStyle网络连接状态}" DataContext="{Binding GaoJingMessage}" Cursor="Hand"/>
<Border Style="{DynamicResource border竖线}" />
<ToggleButton VerticalAlignment="Center" ToolTip="告警消息" HorizontalAlignment="Center" Style="{DynamicResource StatusBtnStyle告警}" DataContext="{Binding GaoJingMessage}" Cursor="Hand"/>
<Border Style="{DynamicResource border竖线}" />


Loading…
Cancel
Save