MainWindow.xaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <Window x:Class="VideoTest.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:WinFormHost="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  7. xmlns:WinFormControls="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
  8. mc:Ignorable="d"
  9. Title="MainWindow" Height="850" Width="1500" Background="LightGray" FontSize="14">
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition/>
  13. <ColumnDefinition Width="400"/>
  14. <ColumnDefinition Width="300"/>
  15. </Grid.ColumnDefinitions>
  16. <Border Grid.Row="0" Grid.Column="0" BorderBrush="Black" BorderThickness="1">
  17. <Grid>
  18. <Grid.RowDefinitions>
  19. <RowDefinition />
  20. <RowDefinition />
  21. </Grid.RowDefinitions>
  22. <!--<WinFormHost:WindowsFormsHost x:Name="WinBoxHost" Grid.Row="0">
  23. <WinFormControls:PictureBox x:Name="WinBox" />
  24. </WinFormHost:WindowsFormsHost>-->
  25. <Image x:Name="WinBox">
  26. </Image>
  27. <WinFormHost:WindowsFormsHost x:Name="WinBoxHost1" Grid.Row="1">
  28. <WinFormControls:PictureBox x:Name="WinBox1" />
  29. </WinFormHost:WindowsFormsHost>
  30. </Grid>
  31. </Border>
  32. <Border Grid.Row="0" Grid.Column="1" BorderBrush="Gray" BorderThickness="1">
  33. <Grid Grid.Row="0" Grid.Column="1">
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="40" />
  36. <RowDefinition Height="40" />
  37. <RowDefinition Height="40" />
  38. <RowDefinition Height="40" />
  39. <RowDefinition Height="40" />
  40. <RowDefinition Height="40" />
  41. <RowDefinition Height="40" />
  42. <RowDefinition Height="40" />
  43. <RowDefinition Height="40" />
  44. <RowDefinition Height="40" />
  45. <RowDefinition Height="40" />
  46. <RowDefinition Height="40" />
  47. <RowDefinition />
  48. </Grid.RowDefinitions>
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="60" />
  51. <ColumnDefinition />
  52. <ColumnDefinition Width="60" />
  53. <ColumnDefinition />
  54. </Grid.ColumnDefinitions>
  55. <Border>
  56. <TextBlock Text="Ip" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  57. </Border>
  58. <Border Grid.Column="1">
  59. <TextBox x:Name="textBoxIP" Text="192.168.81." VerticalContentAlignment="Center" Margin="0,2" />
  60. </Border>
  61. <Border Grid.Column="2">
  62. <TextBlock Text="Port" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  63. </Border>
  64. <Border Grid.Column="3">
  65. <TextBox x:Name="textBoxPort" Text="8000" VerticalContentAlignment="Center" Margin="0,2" />
  66. </Border>
  67. <Border Grid.Row="1">
  68. <TextBlock Text="用户名" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  69. </Border>
  70. <Border Grid.Row="1" Grid.Column="1">
  71. <TextBox x:Name="textBoxUserName" Text="admin" VerticalContentAlignment="Center" Margin="0,2" />
  72. </Border>
  73. <Border Grid.Row="1" Grid.Column="2">
  74. <TextBlock Text="密码" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  75. </Border>
  76. <Border Grid.Row="1" Grid.Column="3">
  77. <TextBox x:Name="textBoxPassword" Text="yunda123" VerticalContentAlignment="Center" Margin="0,2" />
  78. </Border>
  79. <Border Grid.Row="2" Grid.Column="0">
  80. <TextBlock Text="品牌" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  81. </Border>
  82. <Border Grid.Row="2" Grid.Column="1">
  83. <ComboBox x:Name="cbBrand" SelectedIndex="1" SelectedValuePath="Content" Margin="0,2" VerticalContentAlignment="Center">
  84. <ComboBoxItem Content="DHua"/>
  85. <ComboBoxItem Content="Hik"/>
  86. <ComboBoxItem Content="DALI"/>
  87. </ComboBox>
  88. </Border>
  89. <Border Grid.Row="2" Grid.Column="2">
  90. <TextBlock Text="通道号" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  91. </Border>
  92. <Border Grid.Row="2" Grid.Column="3">
  93. <!--<ComboBox x:Name="cbPlayChannel" SelectedIndex="0" SelectedValuePath="Content" Margin="0,2" VerticalContentAlignment="Center">
  94. <ComboBoxItem Content="1"/>
  95. <ComboBoxItem Content="2"/>
  96. <ComboBoxItem Content="3"/>
  97. <ComboBoxItem Content="7"/>
  98. <ComboBoxItem Content="8"/>
  99. <ComboBoxItem Content="33"/>
  100. <ComboBoxItem Content="34"/>
  101. </ComboBox>-->
  102. <TextBox Text="" x:Name="cbPlayChannel"></TextBox>
  103. </Border>
  104. <Border Grid.Row="3">
  105. <TextBlock Text="预置点" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  106. </Border>
  107. <Border Grid.Row="3" Grid.Column="1">
  108. <!--<ComboBox x:Name="cbPreset" SelectedIndex="0" SelectedValuePath="Content" Margin="0,2" VerticalContentAlignment="Center" SelectionChanged="cbPreset_SelectionChanged">
  109. <ComboBoxItem Content="1"/>
  110. <ComboBoxItem Content="2"/>
  111. <ComboBoxItem Content="3"/>
  112. <ComboBoxItem Content="4"/>
  113. <ComboBoxItem Content="5"/>
  114. <ComboBoxItem Content="6"/>
  115. <ComboBoxItem Content="7"/>
  116. <ComboBoxItem Content="8"/>
  117. <ComboBoxItem Content="9"/>
  118. <ComboBoxItem Content="10"/>
  119. <ComboBoxItem Content="11"/>
  120. <ComboBoxItem Content="12"/>
  121. <ComboBoxItem Content="13"/>
  122. <ComboBoxItem Content="14"/>
  123. <ComboBoxItem Content="15"/>
  124. <ComboBoxItem Content="16"/>
  125. </ComboBox>-->
  126. <TextBox Text="" x:Name="cbPreset"></TextBox>
  127. </Border>
  128. <Border Grid.Row="3" Grid.Column="2">
  129. <TextBlock Text="测温点" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" />
  130. </Border>
  131. <Border Grid.Row="3" Grid.Column="3">
  132. <!--<ComboBox x:Name="cbMeasureTemperature" SelectedIndex="0" SelectedValuePath="Content" Margin="0,2" VerticalContentAlignment="Center">
  133. <ComboBoxItem Content="0"/>
  134. <ComboBoxItem Content="1"/>
  135. <ComboBoxItem Content="2"/>
  136. <ComboBoxItem Content="3"/>
  137. <ComboBoxItem Content="4"/>
  138. <ComboBoxItem Content="5"/>
  139. <ComboBoxItem Content="6"/>
  140. <ComboBoxItem Content="7"/>
  141. <ComboBoxItem Content="8"/>
  142. <ComboBoxItem Content="9"/>
  143. <ComboBoxItem Content="10"/>
  144. <ComboBoxItem Content="11"/>
  145. <ComboBoxItem Content="12"/>
  146. <ComboBoxItem Content="13"/>
  147. <ComboBoxItem Content="14"/>
  148. <ComboBoxItem Content="15"/>
  149. <ComboBoxItem Content="16"/>
  150. </ComboBox>-->
  151. <TextBox Text="" x:Name="cbMeasureTemperature"></TextBox>
  152. </Border>
  153. <Border Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="4">
  154. <WrapPanel VerticalAlignment="Center" HorizontalAlignment="Right">
  155. <Button Content="登录" Width="80" Height="30" VerticalAlignment="Center" Margin="2" Click="Login_Click" />
  156. <Button Content="播放" Width="80" Height="30" VerticalAlignment="Center" Margin="2" Click="VideoPlay_Click" />
  157. <Button Content="测温" Width="80" Height="30" VerticalAlignment="Center" Margin="2" Click="MeasureTemperature_Click" IsEnabled="True"/>
  158. <Button Content="截图" Width="80" Height="30" VerticalAlignment="Center" Margin="2" Click="Capture_Click" />
  159. </WrapPanel>
  160. </Border>
  161. <Border Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
  162. <WrapPanel VerticalAlignment="Center" HorizontalAlignment="Right">
  163. <Button Content="上" Width="80" Height="30" VerticalAlignment="Center" Margin="2" PreviewMouseLeftButtonDown="Up_MouseLeftButtonDown" PreviewMouseLeftButtonUp="Up_MouseLeftButtonUp"/>
  164. <Button Content="下" Width="80" Height="30" VerticalAlignment="Center" Margin="2" PreviewMouseLeftButtonDown="Down_MouseLeftButtonDown" PreviewMouseLeftButtonUp="Down_MouseLeftButtonUp"/>
  165. <Button Content="左" Width="80" Height="30" VerticalAlignment="Center" Margin="2" PreviewMouseLeftButtonDown="Left_MouseLeftButtonDown" PreviewMouseLeftButtonUp="Left_MouseLeftButtonUp"/>
  166. <Button Content="右" Width="80" Height="30" VerticalAlignment="Center" Margin="2" PreviewMouseLeftButtonDown="Right_MouseLeftButtonDown" PreviewMouseLeftButtonUp="Right_MouseLeftButtonUp"/>
  167. </WrapPanel>
  168. </Border>
  169. <Button Content="GoPST" Height="30" VerticalAlignment="Center" Margin="4,0,75,0" Click="TurnTopreset_Click" Grid.Column="1" Grid.Row="6"/>
  170. <Button Content="播放2" Visibility="Collapsed" Height="30" VerticalAlignment="Top" Margin="30,1,89,0" Click="StartRealPlayM4_Click" Grid.Column="2" Grid.Row="7" Grid.ColumnSpan="2"/>
  171. <Button Content="SetPST" Height="30" VerticalAlignment="Center" Click="Setpreset_Click" Grid.Column="1" Grid.Row="6" Margin="70,0,19,0"/>
  172. <Button Content="CloseOSD" Height="30" VerticalAlignment="Center" Click="CloseOSD_Click" Grid.Column="3" Grid.Row="6" Margin="4,0,76,0" />
  173. <Button Content="ShowOSD" Height="30" VerticalAlignment="Center" Click="ShowOSD_Click" Grid.Column="3" Grid.Row="6" Margin="75,0,5,0" />
  174. <TextBlock Text="startTime" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="8" />
  175. <TextBox x:Name="startTime" Text="00:00" Grid.Column="1" Grid.Row="8"></TextBox>
  176. <TextBlock Text="endTime" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="2" Grid.Row="8" />
  177. <TextBox x:Name="endTime" Text="00:10" Grid.Column="3" Grid.Row="8"></TextBox>
  178. <Button Content="下载录像" Height="30" VerticalAlignment="Top" Margin="4,6,55,0" Click="DownloadPlayback_Click" Grid.Column="1" Grid.Row="9"/>
  179. <Button Content="播放录像" Margin="4,6,55,0" Click="Playbackt_Click" Grid.Column="3" Grid.Row="9" Height="30" VerticalAlignment="Top"/>
  180. <TextBox x:Name="channels" Text="35,36" Grid.Column="1" Grid.Row="6" Margin="0,36,0,4" Grid.RowSpan="2"/>
  181. <TextBlock Text="多通道号" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="7" />
  182. <Frame x:Name="frame" Grid.Row="10"></Frame>
  183. </Grid>
  184. </Border>
  185. <Border Grid.Column="2" BorderBrush="Gray" BorderThickness="1">
  186. <DockPanel LastChildFill="True">
  187. <Border DockPanel.Dock="Top" Height="45" BorderBrush="Gray" BorderThickness="1">
  188. <TextBlock x:Name="LogText" Foreground="Red" FontSize="14" VerticalAlignment="Center" Margin="10,0" TextWrapping="Wrap"/>
  189. </Border>
  190. <Border BorderBrush="Gray" BorderThickness="1">
  191. <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
  192. <StackPanel>
  193. <TextBlock x:Name="RstText" Foreground="Black" FontSize="14" VerticalAlignment="Top" Margin="10,0" TextWrapping="Wrap" />
  194. <StackPanel Background="#20335D" Height="500">
  195. <Button Content="#FF0000" Background="#FF0000" Height="30" Margin="0,0,0,10"/>
  196. <Button Content="#00FF00" Background="#00FF00" Height="30" Margin="0,0,0,10"/>
  197. <Button Content="#9B59B6" Background="#9B59B6" Height="30" Margin="0,0,0,10"/>
  198. <Button Content="#D35400" Background="#D35400" Height="30" Margin="0,0,0,10"/>
  199. <Button Content="#FFD700" Background="#FFD700" Height="30" Margin="0,0,0,10"/>
  200. <Button Content="#3498DB" Background="#3498DB" Height="30" Margin="0,0,0,10"/>
  201. <Button Content="#F39C12" Background="#F39C12" Height="30" Margin="0,0,0,10"/>
  202. <Button Content="#47AE60" Background="#47AE60" Height="30" Margin="0,0,0,10"/>
  203. <Button Content="#E67E22" Background="#E67E22" Height="30" Margin="0,0,0,10"/>
  204. <Button Content="#1ABC9C" Background="#1ABC9C" Height="30" Margin="0,0,0,10"/>
  205. </StackPanel>
  206. </StackPanel>
  207. </ScrollViewer>
  208. </Border>
  209. </DockPanel>
  210. </Border>
  211. </Grid>
  212. </Window>