StatusBar.xaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <UserControl x:Class="NEIntelligentControl2.Views.MainWindow.StatusBar"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Views.MainWindow"
  7. xmlns:am="clr-namespace:NEIntelligentControl2.Views.Alarm"
  8. mc:Ignorable="d"
  9. d:DesignHeight="36" d:DesignWidth="1920" Loaded="UserControl_Loaded">
  10. <UserControl.Resources>
  11. <SolidColorBrush x:Key="BackgroundColor" Color="#FF253887"/>
  12. <Style x:Key="AlarmText" TargetType="TextBlock">
  13. <Setter Property="VerticalAlignment" Value="Center"/>
  14. <Setter Property="HorizontalAlignment" Value="Center"/>
  15. <Setter Property="Foreground" Value="WhiteSmoke"/>
  16. <Setter Property="FontSize" Value="14"/>
  17. <Setter Property="Margin" Value="20,0"/>
  18. </Style>
  19. </UserControl.Resources>
  20. <Grid Background="{StaticResource BackgroundColor}">
  21. <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
  22. <Image Width="50" MouseLeftButtonUp="Image_MouseLeftButtonUp" Tag="menu" Visibility="Collapsed">
  23. <Image.Style>
  24. <Style TargetType="Image">
  25. <Style.Triggers>
  26. <Trigger Property="IsMouseOver" Value="True">
  27. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/StatusBar/menu_over.png"/>
  28. </Trigger>
  29. <Trigger Property="IsMouseOver" Value="False">
  30. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/StatusBar/menu.png"/>
  31. </Trigger>
  32. </Style.Triggers>
  33. </Style>
  34. </Image.Style>
  35. </Image>
  36. <TextBlock x:Name="time" VerticalAlignment="Center" Margin="20,0,0,0" Foreground="WhiteSmoke"/>
  37. <Border Width="163" MouseLeftButtonUp="Border_MouseLeftButtonUp" Tag="recomend" Visibility="Collapsed">
  38. <Border.Style>
  39. <Style TargetType="Border">
  40. <Style.Triggers>
  41. <Trigger Property="IsMouseOver" Value="False">
  42. <Setter Property="Background">
  43. <Setter.Value>
  44. <ImageBrush ImageSource="pack://application:,,,/智动启停;component/Images/StatusBar/recommend.png"/>
  45. </Setter.Value>
  46. </Setter>
  47. </Trigger>
  48. <Trigger Property="IsMouseOver" Value="True">
  49. <Setter Property="Background">
  50. <Setter.Value>
  51. <ImageBrush ImageSource="pack://application:,,,/智动启停;component/Images/StatusBar/recommend_over.png"/>
  52. </Setter.Value>
  53. </Setter>
  54. </Trigger>
  55. </Style.Triggers>
  56. </Style>
  57. </Border.Style>
  58. <Grid>
  59. <Grid.ColumnDefinitions>
  60. <ColumnDefinition Width="3.2*"/>
  61. <ColumnDefinition/>
  62. <ColumnDefinition Width="0.5*"/>
  63. </Grid.ColumnDefinitions>
  64. <TextBlock x:Name="_TBSCount" Text="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="WhiteSmoke"/>
  65. </Grid>
  66. </Border>
  67. <Image MouseLeftButtonUp="Image_MouseLeftButtonUp" Tag="track" Width="116" Visibility="Collapsed">
  68. <Image.Style>
  69. <Style TargetType="Image">
  70. <Style.Triggers>
  71. <Trigger Property="IsMouseOver" Value="True">
  72. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/StatusBar/track_over.png"/>
  73. </Trigger>
  74. <Trigger Property="IsMouseOver" Value="False">
  75. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/StatusBar/track.png"/>
  76. </Trigger>
  77. </Style.Triggers>
  78. </Style>
  79. </Image.Style>
  80. </Image>
  81. </StackPanel>
  82. <Grid x:Name="gdalarm" Width="595" HorizontalAlignment="Right" Margin="1" MouseEnter="Grid_MouseEnter" MouseLeftButtonUp="gdalarm_MouseLeftButtonUp" Visibility="Collapsed">
  83. <Grid.Background>
  84. <ImageBrush ImageSource="pack://application:,,,/智动启停;component/Images/StatusBar/alarm.png"/>
  85. </Grid.Background>
  86. <Grid.ColumnDefinitions>
  87. <ColumnDefinition Width="Auto"/>
  88. <ColumnDefinition Width="Auto"/>
  89. <ColumnDefinition/>
  90. <ColumnDefinition Width="Auto"/>
  91. </Grid.ColumnDefinitions>
  92. <TextBlock x:Name="_TBAlarmTime" Style="{StaticResource AlarmText}" Margin="110,0,0,0"/>
  93. <TextBlock x:Name="_TBAlarmName" Grid.Column="1" Style="{StaticResource AlarmText}"/>
  94. <TextBlock x:Name="_TBAlarmText" Grid.Column="2" Style="{StaticResource AlarmText}"/>
  95. <TextBlock x:Name="_TBAlarmType" Grid.Column="3" Style="{StaticResource AlarmText}"/>
  96. </Grid>
  97. <Popup Placement="Top" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}, Path=IsMenuOpen}" MouseLeave="Popup_MouseLeave">
  98. <local:MainWindowMenu x:Name="_MWMMain"/>
  99. </Popup>
  100. <Popup x:Name="_PAlarm" Placement="Top" PlacementTarget="{Binding ElementName=gdalarm}" IsOpen="{Binding ElementName=_RFIVMain, Path=IsOpened}" StaysOpen="{Binding ElementName=_RFIVMain,Path=IsFixed}">
  101. <am:RealTimeFalutInfoView x:Name="_RFIVMain"/>
  102. </Popup>
  103. </Grid>
  104. </UserControl>