ControlTrackWindow.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <Window x:Class="NEIntelligentControl2.Windows.ControlTrackWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Windows"
  7. mc:Ignorable="d"
  8. Title="控制跟踪" Height="662" Width="1200" Loaded="Window_Loaded" Background="#FF454545" WindowStyle="None" WindowStartupLocation="CenterOwner" Closing="Window_Closing">
  9. <WindowChrome.WindowChrome>
  10. <WindowChrome/>
  11. </WindowChrome.WindowChrome>
  12. <Window.Resources>
  13. <Style TargetType="{x:Type ScrollBar}">
  14. <Setter Property="Background" Value="#77F0F8FF"/>
  15. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  16. <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
  17. <!--滚动条宽度-->
  18. <Setter Property="Width" Value="8"/>
  19. <Setter Property="MinWidth" Value="6"/>
  20. <Setter Property="Template">
  21. <Setter.Value>
  22. <ControlTemplate TargetType="{x:Type ScrollBar}">
  23. <!--滚动条背景色-->
  24. <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true" Width="8">
  25. <Grid.RowDefinitions>
  26. <RowDefinition />
  27. </Grid.RowDefinitions>
  28. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
  29. <Track.DecreaseRepeatButton>
  30. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  31. </Track.DecreaseRepeatButton>
  32. <Track.IncreaseRepeatButton>
  33. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  34. </Track.IncreaseRepeatButton>
  35. <Track.Thumb>
  36. <Thumb Style="{StaticResource ScrollBarThumb}"/>
  37. </Track.Thumb>
  38. </Track>
  39. </Grid>
  40. <ControlTemplate.Triggers>
  41. <Trigger Property="IsEnabled" Value="false">
  42. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  43. </Trigger>
  44. </ControlTemplate.Triggers>
  45. </ControlTemplate>
  46. </Setter.Value>
  47. </Setter>
  48. <Style.Triggers>
  49. <Trigger Property="Orientation" Value="Horizontal">
  50. <Setter Property="Width" Value="Auto"/>
  51. <Setter Property="MinWidth" Value="0"/>
  52. <Setter Property="Height" Value="6"/>
  53. <Setter Property="MinHeight" Value="6"/>
  54. <Setter Property="Background" Value="#77F0F8FF"/>
  55. <Setter Property="Template">
  56. <Setter.Value>
  57. <ControlTemplate TargetType="{x:Type ScrollBar}">
  58. <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true">
  59. <Grid.ColumnDefinitions>
  60. <ColumnDefinition />
  61. </Grid.ColumnDefinitions>
  62. <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
  63. <Track.DecreaseRepeatButton>
  64. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  65. </Track.DecreaseRepeatButton>
  66. <Track.IncreaseRepeatButton>
  67. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  68. </Track.IncreaseRepeatButton>
  69. <Track.Thumb>
  70. <Thumb Style="{StaticResource ScrollBarThumb}" />
  71. </Track.Thumb>
  72. </Track>
  73. </Grid>
  74. <ControlTemplate.Triggers>
  75. <Trigger Property="IsEnabled" Value="false">
  76. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  77. </Trigger>
  78. </ControlTemplate.Triggers>
  79. </ControlTemplate>
  80. </Setter.Value>
  81. </Setter>
  82. </Trigger>
  83. </Style.Triggers>
  84. </Style>
  85. </Window.Resources>
  86. <Grid>
  87. <Grid>
  88. <Grid.RowDefinitions>
  89. <RowDefinition Height="Auto"/>
  90. <RowDefinition/>
  91. </Grid.RowDefinitions>
  92. <TextBlock Text="操作详情" Margin="5" FontSize="14" Foreground="WhiteSmoke" HorizontalAlignment="Left"/>
  93. <Border Grid.Row="1" Background="#FFF9F9F9" Margin="5" CornerRadius="7">
  94. <TabControl Background="{x:Null}" Margin="3">
  95. <TabItem Header="控制跟踪">
  96. <DataGrid HorizontalGridLinesBrush="#FFA0A0A0" VerticalGridLinesBrush="#FFA0A0A0" FontSize="14" AutoGenerateColumns="False" IsReadOnly="True">
  97. <DataGrid.Columns>
  98. <DataGridTextColumn Header="风机编号" MinWidth="90"/>
  99. <DataGridTextColumn Header="风场" MinWidth="90"/>
  100. <DataGridTextColumn Header="风机型号" MinWidth="90"/>
  101. <DataGridTextColumn Header="控制类型" MinWidth="90"/>
  102. <DataGridTextColumn Header="风速" MinWidth="100"/>
  103. <DataGridTextColumn Header="功率" MinWidth="100"/>
  104. <DataGridTextColumn Header="发电机转速" MinWidth="100"/>
  105. <DataGridTextColumn Header="叶片1角度" MinWidth="100"/>
  106. <DataGridTextColumn Header="叶片2角度" MinWidth="100"/>
  107. <DataGridTextColumn Header="叶片3角度" MinWidth="100"/>
  108. <DataGridTextColumn Header="控制时间" MinWidth="100"/>
  109. <DataGridTextColumn Header="进度" MinWidth="100"/>
  110. </DataGrid.Columns>
  111. </DataGrid>
  112. </TabItem>
  113. <TabItem Header="操作日志" Loaded="TabItem_Loaded">
  114. <Grid>
  115. <Grid.RowDefinitions>
  116. <RowDefinition Height="Auto"/>
  117. <RowDefinition/>
  118. </Grid.RowDefinitions>
  119. <StackPanel Orientation="Horizontal" Margin="0,5">
  120. <TextBlock Text="风场:" VerticalAlignment="Center"/>
  121. <ComboBox x:Name="_CBStation" MinWidth="100" DisplayMemberPath="Name" VerticalAlignment="Center" SelectionChanged="_CBStation_SelectionChanged"/>
  122. <!--<TextBlock Text="操作人:" VerticalAlignment="Center"/>
  123. <ComboBox MinWidth="100" VerticalAlignment="Center"/>
  124. <TextBlock Text="操作类型:" VerticalAlignment="Center"/>
  125. <ComboBox MinWidth="100" VerticalAlignment="Center"/>-->
  126. <TextBlock Text="开始时间:" VerticalAlignment="Center" Margin="10,0,0,0"/>
  127. <TextBox x:Name="_TBStart" MinWidth="120" VerticalAlignment="Center" Padding="3" LostFocus="TextBox_LostFocus"/>
  128. <TextBlock Text="结束时间:" VerticalAlignment="Center" Margin="10,0,0,0"/>
  129. <TextBox x:Name="_TBEnd" MinWidth="120" VerticalAlignment="Center" Padding="3" LostFocus="TextBox_LostFocus"/>
  130. <Button Content="查 询" Padding="17,3" Click="Button_Click" Tag="search" Margin="5"/>
  131. </StackPanel>
  132. <DataGrid Grid.Row="1" x:Name="_DGControlLog" HorizontalGridLinesBrush="#FFA0A0A0" VerticalGridLinesBrush="#FFA0A0A0" FontSize="14" AutoGenerateColumns="False" IsReadOnly="True" Margin="0,0,0,5" Grid.RowSpan="2">
  133. <DataGrid.Columns>
  134. <DataGridTextColumn Header="操作时间" MinWidth="150" Binding="{Binding TimeString}"/>
  135. <DataGridTextColumn Header="风机编号" MinWidth="150" Binding="{Binding WindturbineId}"/>
  136. <DataGridTextColumn Header="场站" MinWidth="150" Binding="{Binding StationName}"/>
  137. <DataGridTextColumn Header="操作类型" MinWidth="150" Binding="{Binding ControlTypeString}"/>
  138. <DataGridTextColumn Header="操作人" MinWidth="150" Binding="{Binding UserName}"/>
  139. <DataGridTextColumn Header="是否成功" MinWidth="150" Binding="{Binding IsSuccess}"/>
  140. </DataGrid.Columns>
  141. </DataGrid>
  142. </Grid>
  143. </TabItem>
  144. <TabItem Header="风机控制日志">
  145. <TextBox Background="DimGray" x:Name="_TBLog" FontSize="14" Foreground="#FF50B55F" BorderBrush="{x:Null}" AcceptsTab="True" AcceptsReturn="True" VerticalScrollBarVisibility="Auto"/>
  146. </TabItem>
  147. </TabControl>
  148. </Border>
  149. <Button Grid.ColumnSpan="2" Height="25" Width="51.8" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="3,0" BorderBrush="{x:Null}" Foreground="{x:Null}" Padding="0,0,0,0" BorderThickness="0,0,0,0" Background="{x:Null}" Click="Button_Click" Tag="close" WindowChrome.IsHitTestVisibleInChrome="True">
  150. <Image Source="pack://application:,,,/智动启停;component/Images/PV/close.png"/>
  151. </Button>
  152. </Grid>
  153. </Grid>
  154. </Window>