星火直播PC
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

RollCallWindow.xaml 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <Window x:Class="XHZB.Desktop.RollCallWindow"
  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:XHZB.Desktop"
  7. Title="RollCallWindow" Width="1066"
  8. Height="768"
  9. AllowsTransparency="True"
  10. Closed="Window_Closed"
  11. Opacity="1"
  12. ShowInTaskbar="False"
  13. WindowStartupLocation="CenterScreen"
  14. WindowStyle="None"
  15. mc:Ignorable="d" BorderThickness="7">
  16. <Window.Effect>
  17. <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
  18. </Window.Effect>
  19. <Window.Background>
  20. <SolidColorBrush Opacity="0" Color="#000000" />
  21. </Window.Background>
  22. <Window.Resources>
  23. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  24. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  25. </Style>
  26. <Style x:Key="MyItemContainStyle" TargetType="ListBoxItem">
  27. <!-- 设置控件模板 -->
  28. <Setter Property="Template">
  29. <Setter.Value>
  30. <ControlTemplate TargetType="ListBoxItem">
  31. <Border
  32. Margin="4,0,0,0"
  33. Padding="0"
  34. Background="{TemplateBinding Background}">
  35. <ContentPresenter
  36. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  37. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  38. TextBlock.Foreground="{TemplateBinding Foreground}" />
  39. </Border>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. <Style x:Key="BigFontButtonStyle" TargetType="Button">
  45. <Style.Setters>
  46. <Setter Property="Template">
  47. <Setter.Value>
  48. <ControlTemplate TargetType="Button">
  49. <Border
  50. x:Name="border"
  51. Padding="4,2"
  52. Background="{TemplateBinding Background}"
  53. BorderBrush="DarkGray"
  54. BorderThickness="1"
  55. CornerRadius="3">
  56. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  57. </Border>
  58. </ControlTemplate>
  59. </Setter.Value>
  60. </Setter>
  61. </Style.Setters>
  62. </Style>
  63. <DataTemplate x:Key="UserItemTemp">
  64. <Grid
  65. Width="90"
  66. Height="125"
  67. Margin="9,20,9,10">
  68. <Image
  69. Width="90"
  70. Margin="0,0,0,0"
  71. HorizontalAlignment="Center"
  72. Source="{Binding Attendance}"
  73. Visibility="{Binding Attendance_3}" />
  74. <Image
  75. Width="90"
  76. Margin="0,0,0,0"
  77. HorizontalAlignment="Center"
  78. Source=".\Images\RollCall\attendance_33.png"
  79. Visibility="{Binding Attendance_33}" />
  80. <StackPanel
  81. Margin="0,0,0,0"
  82. VerticalAlignment="Center"
  83. Background="Transparent">
  84. <Image
  85. Width="55"
  86. Height="55"
  87. HorizontalAlignment="Center"
  88. Source="{Binding Pic}"
  89. Stretch="Fill">
  90. <Image.Clip>
  91. <EllipseGeometry
  92. Center="27.5,27.5"
  93. RadiusX="27.5"
  94. RadiusY="27.5" />
  95. </Image.Clip>
  96. </Image>
  97. <TextBlock
  98. Padding="0,12,0,0"
  99. HorizontalAlignment="Center"
  100. FontSize="20"
  101. Foreground="#3C525B"
  102. Text="{Binding Name}" />
  103. </StackPanel>
  104. <Image
  105. x:Name="imgMedal"
  106. Width="42"
  107. Margin="0,-15,-10,0"
  108. HorizontalAlignment="Right"
  109. VerticalAlignment="Top"
  110. Source="{Binding Medal}" />
  111. </Grid>
  112. </DataTemplate>
  113. </Window.Resources>
  114. <Grid>
  115. <Image Source=".\Images\RollCall\attendance_0_0_0.png" Stretch="Fill" />
  116. <Grid Margin="10,36,10,10">
  117. <Grid.RowDefinitions>
  118. <RowDefinition Height="30" />
  119. <RowDefinition Height="76" />
  120. <RowDefinition Height="*" />
  121. <RowDefinition Height="95" />
  122. <RowDefinition Height="64" />
  123. </Grid.RowDefinitions>
  124. <!-- 头部 -->
  125. <Grid Grid.Row="0" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
  126. <TextBlock
  127. Grid.Row="0"
  128. Margin="0,0,0,0"
  129. HorizontalAlignment="Center"
  130. VerticalAlignment="Center"
  131. FontSize="30"
  132. Foreground="White"
  133. Text=" 直播点名抢答 " />
  134. </Grid>
  135. <UniformGrid
  136. Grid.Row="1"
  137. Columns="2"
  138. Rows="1">
  139. <Button Cursor="Hand"
  140. x:Name="btnRandomRollCall"
  141. Width="223"
  142. Height="55"
  143. Margin="220,0,0,0"
  144. VerticalAlignment="Bottom"
  145. BorderThickness="0"
  146. Click="btnRandomRollCall_Click"
  147. FontSize="26"
  148. Foreground="White">
  149. <Grid>
  150. <Grid.RowDefinitions>
  151. <RowDefinition Height="auto" />
  152. </Grid.RowDefinitions>
  153. <Image
  154. x:Name="imgRandomRollCall"
  155. Grid.Row="0"
  156. Source=".\Images\RollCall\rollCall_10.png" />
  157. <Image
  158. x:Name="imgRandomRollCallTwo"
  159. Grid.Row="0"
  160. Source=".\Images\RollCall\rollCall_11.png"
  161. Visibility="Collapsed" />
  162. <TextBlock
  163. Grid.Row="0"
  164. Padding="50,5,0,0"
  165. HorizontalAlignment="Center"
  166. Foreground="White"
  167. Text="随机点名" />
  168. <Image
  169. Grid.Row="0"
  170. Width="31"
  171. Margin="40,0,0,0"
  172. HorizontalAlignment="Left"
  173. Source=".\Images\RollCall\rollCall_13.png" />
  174. </Grid>
  175. <Button.Template>
  176. <ControlTemplate TargetType="{x:Type Button}">
  177. <Border
  178. BorderBrush="{TemplateBinding Control.BorderBrush}"
  179. BorderThickness="0"
  180. CornerRadius="27,27,27,27">
  181. <Border.Background>#FFFFFF</Border.Background>
  182. <ContentPresenter
  183. HorizontalAlignment="Center"
  184. VerticalAlignment="Center"
  185. Content="{TemplateBinding ContentControl.Content}" />
  186. </Border>
  187. </ControlTemplate>
  188. </Button.Template>
  189. </Button>
  190. <Button
  191. x:Name="btnAnswer"
  192. Width="223"
  193. Height="55"
  194. Margin="0,0,220,0"
  195. VerticalAlignment="Bottom"
  196. Click="btnAnswer_Click"
  197. Cursor="Hand"
  198. FontSize="26"
  199. Foreground="White">
  200. <Grid>
  201. <Grid.RowDefinitions>
  202. <RowDefinition Height="auto" />
  203. </Grid.RowDefinitions>
  204. <Image
  205. x:Name="imgAnswer"
  206. Grid.Row="0"
  207. Source=".\Images\RollCall\rollCall_10.png" />
  208. <Image
  209. x:Name="imgAnswerTwo"
  210. Grid.Row="0"
  211. Source=".\Images\RollCall\rollCall_11.png"
  212. Visibility="Collapsed" />
  213. <TextBlock
  214. Grid.Row="0"
  215. Padding="50,5,0,0"
  216. HorizontalAlignment="Center"
  217. Foreground="White"
  218. Text="开始抢答" />
  219. <Image
  220. Grid.Row="0"
  221. Width="31"
  222. Margin="40,0,0,0"
  223. HorizontalAlignment="Left"
  224. Source=".\Images\RollCall\rollCall_12.png" />
  225. </Grid>
  226. <Button.Template>
  227. <ControlTemplate TargetType="{x:Type Button}">
  228. <Border
  229. BorderBrush="{TemplateBinding Control.BorderBrush}"
  230. BorderThickness="0"
  231. CornerRadius="27,27,27,27">
  232. <Border.Background>#FFFFFF</Border.Background>
  233. <ContentPresenter
  234. HorizontalAlignment="Center"
  235. VerticalAlignment="Center"
  236. Content="{TemplateBinding ContentControl.Content}" />
  237. </Border>
  238. </ControlTemplate>
  239. </Button.Template>
  240. </Button>
  241. </UniformGrid>
  242. <Grid Grid.Row="2">
  243. <ListBox
  244. x:Name="toolbar_list"
  245. Margin="10,0,10,0"
  246. Background="#f3f3f3"
  247. BorderThickness="0"
  248. ItemContainerStyle="{DynamicResource MyItemContainStyle}"
  249. ItemTemplate="{StaticResource UserItemTemp}"
  250. ItemsSource="{Binding userList}"
  251. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  252. ScrollViewer.VerticalScrollBarVisibility="Disabled">
  253. <ListBox.Template>
  254. <ControlTemplate TargetType="{x:Type ListBox}">
  255. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
  256. <WrapPanel
  257. IsItemsHost="True"
  258. Orientation="Horizontal"
  259. ScrollViewer.CanContentScroll="True" />
  260. </ScrollViewer>
  261. </ControlTemplate>
  262. </ListBox.Template>
  263. </ListBox>
  264. <StackPanel
  265. x:Name="stpAnswer"
  266. Margin="0,350,0,0"
  267. HorizontalAlignment="Center"
  268. Orientation="Horizontal"
  269. Visibility="Collapsed">
  270. <TextBlock FontSize="30" Text="共" />
  271. <TextBlock
  272. x:Name="txbNumberOfReplies"
  273. FontSize="30"
  274. Foreground="#136EFB"
  275. Text="0" />
  276. <TextBlock FontSize="30" Text="人抢答" />
  277. </StackPanel>
  278. </Grid>
  279. <Viewbox Grid.Row="3">
  280. <Border
  281. Grid.Row="3"
  282. Margin="33,0,33,0"
  283. Background="#dee2e1"
  284. CornerRadius="5">
  285. <Border
  286. Margin="1,1,1,1"
  287. Background="#FFFFFF"
  288. CornerRadius="5">
  289. <StackPanel
  290. Grid.Row="3"
  291. Margin="0,5,0,5"
  292. Orientation="Horizontal">
  293. <TextBlock
  294. Padding="3,0,0,0"
  295. FontSize="20.5"
  296. Foreground="#FF0000"
  297. Text="●" />
  298. <TextBlock
  299. Padding="3,3,0,0"
  300. FontSize="16.5"
  301. Foreground="#333333"
  302. Text="未上线:" />
  303. <TextBlock
  304. x:Name="txbNotOnline"
  305. MinWidth="900"
  306. Width="1180"
  307. Padding="3,3,0,0"
  308. FontSize="16.5"
  309. Foreground="#999999"
  310. Text="暂无"
  311. TextWrapping="Wrap" />
  312. </StackPanel>
  313. </Border>
  314. </Border>
  315. </Viewbox>
  316. <Grid Grid.Row="4">
  317. <Button
  318. Width="336"
  319. Height="55"
  320. VerticalAlignment="Center"
  321. Click="btnDown_Click"
  322. Content="关闭"
  323. Cursor="Hand"
  324. FontSize="24"
  325. FontWeight="Black"
  326. Foreground="White">
  327. <Button.Template>
  328. <ControlTemplate TargetType="{x:Type Button}">
  329. <Border
  330. BorderBrush="{TemplateBinding Control.BorderBrush}"
  331. BorderThickness="0"
  332. CornerRadius="27,27,27,27">
  333. <Border.Background>#6098FF</Border.Background>
  334. <ContentPresenter
  335. HorizontalAlignment="Center"
  336. VerticalAlignment="Center"
  337. Content="{TemplateBinding ContentControl.Content}" />
  338. </Border>
  339. </ControlTemplate>
  340. </Button.Template>
  341. </Button>
  342. </Grid>
  343. </Grid>
  344. </Grid>
  345. </Window>