星火直播PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AttendanceWindow.xaml 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <Window x:Class="XHZB.Desktop.AttendanceWindow"
  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. Width="1066"
  8. Height="768"
  9. AllowsTransparency="True"
  10. Closed="Window_Closed"
  11. Loaded="Window_Loaded"
  12. ResizeMode="NoResize"
  13. ShowInTaskbar="False"
  14. Unloaded="Window_Unloaded"
  15. WindowStartupLocation="CenterScreen"
  16. WindowState="Normal"
  17. WindowStyle="None"
  18. mc:Ignorable="d" BorderThickness="7">
  19. <Window.Effect>
  20. <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
  21. </Window.Effect>
  22. <Window.Background>
  23. <SolidColorBrush Opacity="1" />
  24. </Window.Background>
  25. <Window.Resources>
  26. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  27. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  28. </Style>
  29. <Style x:Key="oiliu" TargetType="ListBoxItem">
  30. <!-- 设置控件模板 -->
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="ListBoxItem">
  34. <Border
  35. Margin="4,0,0,0"
  36. Padding="0"
  37. Background="{TemplateBinding Background}">
  38. <ContentPresenter
  39. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  40. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  41. TextBlock.Foreground="{TemplateBinding Foreground}" />
  42. </Border>
  43. </ControlTemplate>
  44. </Setter.Value>
  45. </Setter>
  46. </Style>
  47. <Style x:Key="BigFontButtonStyle" TargetType="Button">
  48. <Style.Setters>
  49. <Setter Property="Template">
  50. <Setter.Value>
  51. <ControlTemplate TargetType="Button">
  52. <Border
  53. x:Name="border"
  54. Padding="4,2"
  55. Background="{TemplateBinding Background}"
  56. BorderBrush="DarkGray"
  57. BorderThickness="1"
  58. CornerRadius="3">
  59. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  60. </Border>
  61. </ControlTemplate>
  62. </Setter.Value>
  63. </Setter>
  64. </Style.Setters>
  65. </Style>
  66. <DataTemplate x:Key="UserTpl">
  67. <StackPanel
  68. Width="109"
  69. Height="138"
  70. Background="Transparent">
  71. <Image
  72. Width="113"
  73. Height="113"
  74. HorizontalAlignment="Center"
  75. Source=".\Images\RollCall\attendance_3.png" />
  76. <StackPanel Margin="0,-115,0,0" Background="Transparent">
  77. <Image
  78. Width="55"
  79. Height="55"
  80. Margin="0,10,0,0"
  81. VerticalAlignment="Center"
  82. Source="{Binding Pic}"
  83. Stretch="Fill">
  84. <Image.Clip>
  85. <EllipseGeometry
  86. Center="27.5,27.5"
  87. RadiusX="27.5"
  88. RadiusY="27.5" />
  89. </Image.Clip>
  90. </Image>
  91. <TextBlock
  92. Padding="0,12,0,0"
  93. HorizontalAlignment="Center"
  94. FontSize="20"
  95. Foreground="#3C525B"
  96. Text="{Binding Name}" />
  97. </StackPanel>
  98. </StackPanel>
  99. </DataTemplate>
  100. </Window.Resources>
  101. <Grid>
  102. <Image Source=".\Images\RollCall\attendance_0_0_0.png" Stretch="Fill" />
  103. <Grid Margin="10,15,10,10">
  104. <Grid.RowDefinitions>
  105. <RowDefinition Height="70" />
  106. <RowDefinition Height="100" />
  107. <RowDefinition Height="*" />
  108. <RowDefinition Height="95" />
  109. <RowDefinition Height="64" />
  110. </Grid.RowDefinitions>
  111. <Grid Grid.Row="0" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" HorizontalAlignment="Center">
  112. <TextBlock
  113. Grid.Row="0"
  114. HorizontalAlignment="Center"
  115. VerticalAlignment="Center"
  116. FontSize="30"
  117. Foreground="White"
  118. Text=" 在线学生 "/>
  119. </Grid>
  120. <StackPanel
  121. Grid.Row="1"
  122. Margin="0,0,10,0"
  123. HorizontalAlignment="Right"
  124. VerticalAlignment="Center"
  125. Orientation="Horizontal">
  126. <TextBlock FontSize="26" Text="在线人数:" />
  127. <TextBlock
  128. x:Name="txbOnlineUsers"
  129. Margin="0,0,0,0"
  130. FontSize="31"
  131. FontWeight="Black"
  132. Foreground="#136EFB"
  133. Text="0" />
  134. <TextBlock
  135. Margin="0,0,0,0"
  136. FontSize="31"
  137. Foreground="#333333"
  138. Text="/" />
  139. <TextBlock
  140. x:Name="txbTotalPeople"
  141. Margin="0,0,0,0"
  142. Padding="0,2,0,0"
  143. FontSize="28"
  144. Foreground="#333333"
  145. Text="0" />
  146. </StackPanel>
  147. <ListBox
  148. x:Name="toolbar_list"
  149. Grid.Row="2"
  150. Margin="5,0,5,0"
  151. Background="#f3f3f3"
  152. BorderThickness="0"
  153. ItemContainerStyle="{DynamicResource oiliu}"
  154. ItemTemplate="{StaticResource UserTpl}"
  155. ItemsSource="{Binding menuList}"
  156. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  157. ScrollViewer.VerticalScrollBarVisibility="Disabled">
  158. <ListBox.Template>
  159. <ControlTemplate TargetType="{x:Type ListBox}">
  160. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
  161. <WrapPanel
  162. IsItemsHost="True"
  163. Orientation="Horizontal"
  164. ScrollViewer.CanContentScroll="True" />
  165. </ScrollViewer>
  166. </ControlTemplate>
  167. </ListBox.Template>
  168. </ListBox>
  169. <Grid x:Name="gridImg" Grid.Row="2" Visibility="Collapsed">
  170. <Image x:Name="img"/>
  171. </Grid>
  172. <Viewbox Grid.Row="3" Visibility="Hidden">
  173. <Border
  174. Grid.Row="3"
  175. Margin="25,0,25,0"
  176. Background="#dee2e1"
  177. CornerRadius="5">
  178. <Border
  179. Margin="1,1,1,1"
  180. Background="#FFFFFF"
  181. CornerRadius="5">
  182. <StackPanel
  183. Grid.Row="3"
  184. Margin="0,5,0,5"
  185. Orientation="Horizontal">
  186. <TextBlock
  187. Padding="3,0,0,0"
  188. FontSize="20.5"
  189. Foreground="#FF0000"
  190. Text="●" />
  191. <TextBlock
  192. Padding="3,3,0,0"
  193. FontSize="16.5"
  194. Foreground="#333333"
  195. Text="未上线:" />
  196. <TextBlock
  197. x:Name="txbNotOnline"
  198. Width="1160" MinWidth="900"
  199. Padding="3,3,0,0"
  200. FontSize="16.5"
  201. Foreground="#999999"
  202. Text="暂无"
  203. TextWrapping="Wrap" />
  204. </StackPanel>
  205. </Border>
  206. </Border>
  207. </Viewbox>
  208. <Button Cursor="Hand"
  209. x:Name="btnEnd"
  210. Grid.Row="4"
  211. Width="336"
  212. Height="46"
  213. HorizontalAlignment="Center"
  214. Background="White"
  215. Click="btnEnd_Click"
  216. Content="关闭"
  217. FontSize="22"
  218. FontWeight="Black"
  219. Foreground="White"
  220. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  221. <Button.Template>
  222. <ControlTemplate TargetType="{x:Type Button}">
  223. <Border
  224. Background="#6098FF"
  225. BorderBrush="{TemplateBinding Control.BorderBrush}"
  226. BorderThickness="1"
  227. CornerRadius="23">
  228. <ContentPresenter
  229. HorizontalAlignment="Center"
  230. VerticalAlignment="Center"
  231. Content="{TemplateBinding ContentControl.Content}" />
  232. </Border>
  233. </ControlTemplate>
  234. </Button.Template>
  235. </Button>
  236. </Grid>
  237. </Grid>
  238. </Window>