WindStationBlock.xaml 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <UserControl x:Class="NEIntelligentControl2.Views.Matrix.WindStationBlock"
  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.Matrix"
  7. xmlns:basic="clr-namespace:NEIntelligentControl2.Views.Basic"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <Style x:Key="TitleSytle" TargetType="TextBlock">
  12. <Setter Property="Background" Value="DarkGray"/>
  13. <Setter Property="Padding" Value="14,3"/>
  14. </Style>
  15. </UserControl.Resources>
  16. <Border Margin="0,1" BorderBrush="#FF575757" BorderThickness="1">
  17. <Grid Margin="1">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="Auto"/>
  20. <RowDefinition/>
  21. </Grid.RowDefinitions>
  22. <StackPanel Orientation="Horizontal" Background="#FF99B4D1">
  23. <TextBlock Background="SeaShell" Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=StationInfo.FullName}" MinWidth="100" Style="{StaticResource TitleSytle}"/>
  24. <TextBlock Text="接入台数" Style="{StaticResource TitleSytle}"/>
  25. <TextBlock Background="White" Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountTotal}" Style="{StaticResource TitleSytle}"/>
  26. <TextBlock Text="并网" Style="{StaticResource TitleSytle}"/>
  27. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountConnect}" Style="{StaticResource TitleSytle}" Background="#FFC8EAFF"/>
  28. <TextBlock Text="待机" Style="{StaticResource TitleSytle}"/>
  29. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountStandby}" Style="{StaticResource TitleSytle}" Background="#FFCFF1E8"/>
  30. <TextBlock Text="停机" Style="{StaticResource TitleSytle}"/>
  31. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountStopped}" Style="{StaticResource TitleSytle}" Background="#FF7E7935"/>
  32. <TextBlock Text="维护" Style="{StaticResource TitleSytle}"/>
  33. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountMaintain}" Style="{StaticResource TitleSytle}" Background="#FFFF720E"/>
  34. <TextBlock Text="故障" Style="{StaticResource TitleSytle}"/>
  35. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountFault}" Style="{StaticResource TitleSytle}" Background="#FFDB3333"/>
  36. <TextBlock Text="离线" Style="{StaticResource TitleSytle}"/>
  37. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountOffline}" Background="#FFF4F4F4" Style="{StaticResource TitleSytle}"/>
  38. </StackPanel>
  39. <basic:OptionalUniformGrid x:Name="_OPUGMain" Grid.Row="1" Columns="23" MinHeight="70"/>
  40. <Grid.ContextMenu>
  41. <ContextMenu>
  42. <MenuItem Header="启动" Click="MenuItem_Click" Tag="Start"/>
  43. <MenuItem Header="停机" Click="MenuItem_Click" Tag="Stop"/>
  44. <MenuItem Header="复位" Click="MenuItem_Click" Tag="Reset"/>
  45. <MenuItem Header="维护" Click="MenuItem_Click" Tag="Maintain"/>
  46. <MenuItem Header="取消维护" Click="MenuItem_Click" Tag="UnMaintain"/>
  47. <MenuItem Header="挂牌">
  48. <MenuItem Header="检修" Click="MenuItem_Click_Lock" Tag="CheckLock"/>
  49. <MenuItem Header="故障维修" Click="MenuItem_Click_Lock" Tag="FaultLock"/>
  50. <MenuItem Header="场内受累检修" Click="MenuItem_Click_Lock" Tag="StationCheckLock"/>
  51. <MenuItem Header="场内受累故障" Click="MenuItem_Click_Lock" Tag="StationFaulLock"/>
  52. <MenuItem Header="场外受累电网" Click="MenuItem_Click_Lock" Tag="StationPowerLineLock"/>
  53. <MenuItem Header="场外受累天气" Click="MenuItem_Click_Lock" Tag="StationWeatherLock"/>
  54. <MenuItem Header="自定义" Click="MenuItem_Click_Lock" Tag="CustomerLock"/>
  55. </MenuItem>
  56. <MenuItem Header="取消挂牌" Click="MenuItem_Click_Lock" Tag="UnLock"/>
  57. <MenuItem Header="参数对比" Click="MenuItem_Click" Tag="compar"/>
  58. </ContextMenu>
  59. </Grid.ContextMenu>
  60. </Grid>
  61. </Border>
  62. </UserControl>