星火直播PC
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. <Window x:Class="XHZB.Desktop.LoginWindow"
  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" xmlns:util="clr-namespace:XHZB.Desktop.Utils"
  7. Width="480"
  8. Height="384"
  9. AllowsTransparency="True"
  10. Loaded="Window_Loaded"
  11. MouseLeftButtonDown="Window_MouseLeftButtonDown_1"
  12. ResizeMode="NoResize"
  13. ShowInTaskbar="True"
  14. SizeChanged="Window_SizeChanged"
  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. <!--Combox右侧下拉按钮-->
  27. <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
  28. <Setter Property="Template">
  29. <Setter.Value>
  30. <ControlTemplate>
  31. <!--下拉按钮内部背景色-->
  32. <Border x:Name="Back" Background="Transparent" BorderThickness="1" BorderBrush="Transparent">
  33. <!--下拉按钮内边框-->
  34. <Label Name="PathFill" Content="ˇ" FontSize="28" Padding="0,7,12,0" HorizontalAlignment="Right">
  35. </Label>
  36. </Border>
  37. <ControlTemplate.Triggers>
  38. <Trigger Property="IsMouseOver" Value="True">
  39. <Setter TargetName="Back" Property="Background" Value="Transparent"></Setter>
  40. <Setter TargetName="Back" Property="BorderBrush" Value="Transparent"></Setter>
  41. </Trigger>
  42. </ControlTemplate.Triggers>
  43. </ControlTemplate>
  44. </Setter.Value>
  45. </Setter>
  46. </Style>
  47. <!--Combox-->
  48. <Style TargetType="ComboBox" x:Key="ComboBoxStyle">
  49. <Setter Property="ItemContainerStyle">
  50. <Setter.Value>
  51. <!--ComBoxItem-->
  52. <Style TargetType="ComboBoxItem">
  53. <Setter Property="MinHeight" Value="32"></Setter>
  54. <Setter Property="MinWidth" Value="60"></Setter>
  55. <Setter Property="Template">
  56. <Setter.Value>
  57. <ControlTemplate TargetType="ComboBoxItem">
  58. <Border Name="Back" Background="Transparent" BorderThickness="0,0,0,0" BorderBrush="#f3f3f3">
  59. <ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" ></ContentPresenter>
  60. </Border>
  61. <ControlTemplate.Triggers>
  62. <Trigger Property="IsMouseOver" Value="True">
  63. <Setter TargetName="Back" Property="Background" Value="#f3f3f3"></Setter>
  64. </Trigger>
  65. <!--下拉框背景色-->
  66. <Trigger Property="IsHighlighted" Value="True">
  67. <Setter TargetName="Back" Property="Background" Value="#f3f3f3"></Setter>
  68. </Trigger>
  69. </ControlTemplate.Triggers>
  70. </ControlTemplate>
  71. </Setter.Value>
  72. </Setter>
  73. </Style>
  74. </Setter.Value>
  75. </Setter>
  76. <Setter Property="Template">
  77. <Setter.Value>
  78. <ControlTemplate TargetType="ComboBox">
  79. <Grid>
  80. <Grid.ColumnDefinitions>
  81. </Grid.ColumnDefinitions>
  82. <!--文字区域背景和边线样式-->
  83. <TextBox Background="#FFFFFF" Padding="10,0,0,0" VerticalAlignment="Center" Grid.Column="0" Foreground="Black" BorderBrush="#c0c0c0" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}"></TextBox>
  84. <Border Grid.Column="0" BorderThickness="0.6" BorderBrush="#c0c0c0" CornerRadius="1,0,0,1">
  85. </Border>
  86. <!--右侧下拉button设置-->
  87. <Border Grid.Column="1" BorderThickness="0,0.6,0.6,0.6" BorderBrush="#c0c0c0" CornerRadius="0,1,1,0" >
  88. <ToggleButton BorderThickness="3" BorderBrush="Black" Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
  89. </Border>
  90. <!--弹出popup整体设置-->
  91. <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
  92. <!--弹出popup边框-->
  93. <Border CornerRadius="1" BorderBrush="#d2d2d2" BorderThickness="1,0,1,1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
  94. <Border.Effect>
  95. <DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="1"/>
  96. </Border.Effect>
  97. <!--下拉幕布边界背景设置 MaxHeight="{TemplateBinding MaxDropDownHeight}"-->
  98. <ScrollViewer Margin="0,0,0,0" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderBrush="#17acae" BorderThickness="2" >
  99. <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
  100. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="#FFFFFF"/>
  101. </ScrollViewer>
  102. </Border>
  103. </Popup>
  104. </Grid>
  105. </ControlTemplate>
  106. </Setter.Value>
  107. </Setter>
  108. </Style>
  109. <util:GenericTypeConverter x:Key="ZJGenericTypeConverter" />
  110. <Style x:Key="oiliu" TargetType="ListBoxItem">
  111. <!-- 设置控件模板 -->
  112. <Setter Property="Template">
  113. <Setter.Value>
  114. <ControlTemplate TargetType="ListBoxItem">
  115. <Border
  116. Margin="4,0,0,0"
  117. Padding="0"
  118. Background="{TemplateBinding Background}">
  119. <ContentPresenter
  120. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  121. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  122. TextBlock.Foreground="{TemplateBinding Foreground}" />
  123. </Border>
  124. </ControlTemplate>
  125. </Setter.Value>
  126. </Setter>
  127. </Style>
  128. </Window.Resources>
  129. <Viewbox>
  130. <Grid Width="480" Height="384" >
  131. <Grid.RowDefinitions>
  132. <RowDefinition Height="*" />
  133. </Grid.RowDefinitions>
  134. <Grid.Background>
  135. <ImageBrush x:Name="imgBrush" ImageSource="/Images/Login/login2_0_1.png" />
  136. </Grid.Background>
  137. <StackPanel Margin="10,0,0,0">
  138. <Image
  139. Width="30"
  140. Height="21"
  141. Margin="0,10,0,0"
  142. HorizontalAlignment="Left"
  143. Source=".\Images\Login\logo@2x.png" />
  144. <TextBlock
  145. Margin="35,-20,0,0"
  146. FontSize="13"
  147. Foreground="White"
  148. Text="星火直播" />
  149. <Button
  150. x:Name="btnDown"
  151. Width="30.8"
  152. Height="30.8"
  153. Margin="0,-25,5,0"
  154. HorizontalAlignment="Right"
  155. Click="btnDown_Click"
  156. Cursor="Hand"
  157. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  158. <Button.Template>
  159. <ControlTemplate TargetType="{x:Type Button}">
  160. <Border
  161. BorderBrush="{TemplateBinding Control.BorderBrush}"
  162. BorderThickness="1"
  163. CornerRadius="20,20,20,20">
  164. <Border.Background>#FFFFFFFF</Border.Background>
  165. <ContentPresenter
  166. HorizontalAlignment="Center"
  167. VerticalAlignment="Center"
  168. Content="{TemplateBinding ContentControl.Content}" />
  169. </Border>
  170. </ControlTemplate>
  171. </Button.Template>
  172. <Image Source=".\Images\Login\组 1@2x(1).png" />
  173. </Button>
  174. </StackPanel>
  175. <Grid
  176. x:Name="grLogin"
  177. Margin="0,0,0,0"
  178. Visibility="Visible">
  179. <Grid.RowDefinitions>
  180. <RowDefinition Height="auto" />
  181. <RowDefinition Height="34.7" />
  182. <RowDefinition Height="37" />
  183. <RowDefinition Height="17.3" />
  184. <RowDefinition Height="37" />
  185. <RowDefinition Height="15.1" />
  186. <RowDefinition Height="auto" />
  187. <RowDefinition Height="12.8" />
  188. <RowDefinition Height="37" />
  189. <RowDefinition Height="*" />
  190. </Grid.RowDefinitions>
  191. <!--<Image
  192. Grid.Row="0"
  193. Width="228"
  194. Height="34.5"
  195. Margin="0,66.2,0,0"
  196. HorizontalAlignment="Center"
  197. Source=".\Images\Login\智慧校园@2x.png" />-->
  198. <Label Content="星 火 直 播" Grid.Row="0" Width="200" Margin="0,66.2,0,0" Foreground="White" FontSize="35" FontWeight="Bold" HorizontalContentAlignment="Center" />
  199. <Border
  200. Grid.Row="2"
  201. Width="272"
  202. HorizontalAlignment="Center"
  203. Background="White"
  204. CornerRadius="17">
  205. <TextBox
  206. x:Name="txbAccountNumber"
  207. Grid.Row="2"
  208. Width="272"
  209. Padding="40,10,0,0"
  210. Background="Transparent"
  211. BorderBrush="{x:Null}"
  212. BorderThickness="0"
  213. FontSize="15"
  214. Foreground="#333333"
  215. MouseLeftButtonDown="txbAccountNumber_MouseLeftButtonDown"
  216. Text="" />
  217. </Border>
  218. <Image
  219. Grid.Row="2"
  220. Width="13"
  221. Height="14"
  222. Margin="120,0,0,0"
  223. HorizontalAlignment="Left"
  224. Source=".\Images\Login\data copy 2@2x.png" />
  225. <Border
  226. Grid.Row="4"
  227. Width="272"
  228. HorizontalAlignment="Center"
  229. Background="White"
  230. CornerRadius="17">
  231. <PasswordBox
  232. x:Name="pobPassword"
  233. Grid.Row="4"
  234. Width="230"
  235. Padding="20,10,0,0"
  236. Background="Transparent"
  237. BorderBrush="{x:Null}"
  238. BorderThickness="0"
  239. FontSize="15"
  240. Foreground="#333333"
  241. PasswordChar="*" />
  242. </Border>
  243. <Image
  244. Grid.Row="4"
  245. Width="13"
  246. Height="14"
  247. Margin="120,0,0,0"
  248. HorizontalAlignment="Left"
  249. Source=".\Images\Login\account copy 2@2x.png" />
  250. <CheckBox Cursor="Hand"
  251. x:Name="ckSaveName"
  252. Grid.Row="6"
  253. Width="15.4"
  254. Height="15.4"
  255. Margin="120,0,0,0"
  256. HorizontalAlignment="Left"
  257. Click="ckSaveName_Click" />
  258. <TextBlock
  259. Grid.Row="6"
  260. Margin="145,0,0,0"
  261. FontSize="15"
  262. Foreground="White"
  263. Text="记住账号" />
  264. <Button
  265. x:Name="btnLogin"
  266. Grid.Row="8"
  267. Width="272"
  268. Height="37"
  269. Click="btnLogin_Click"
  270. Content="立即登录"
  271. FontSize="17"
  272. IsDefault="True"
  273. Cursor="Hand"
  274. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  275. <Button.Template>
  276. <ControlTemplate TargetType="{x:Type Button}">
  277. <Border
  278. BorderBrush="{TemplateBinding Control.BorderBrush}"
  279. BorderThickness="1"
  280. CornerRadius="17">
  281. <Border.Background>#FFFFFFFF</Border.Background>
  282. <ContentPresenter
  283. HorizontalAlignment="Center"
  284. VerticalAlignment="Center"
  285. Content="{TemplateBinding ContentControl.Content}" />
  286. </Border>
  287. </ControlTemplate>
  288. </Button.Template>
  289. </Button>
  290. </Grid>
  291. <Grid x:Name="grLoginTwo" Visibility="Collapsed">
  292. <Grid.RowDefinitions>
  293. <RowDefinition Height="36" />
  294. <RowDefinition Height="64" />
  295. <!-- 班级 -->
  296. <RowDefinition Height="*" />
  297. </Grid.RowDefinitions>
  298. <TextBlock Padding="0,0,0,10"
  299. x:Name="txbHeader"
  300. Grid.Row="1"
  301. Grid.ColumnSpan="2"
  302. HorizontalAlignment="Center"
  303. VerticalAlignment="Center"
  304. Block.TextAlignment="Center"
  305. FontSize="30"
  306. Foreground="White"
  307. Text="老师,您好!"
  308. TextAlignment="Center"
  309. TextWrapping="WrapWithOverflow" />
  310. <Grid Grid.Row="2" Background="White">
  311. <Grid Margin="36,0,36,0">
  312. <Grid.RowDefinitions>
  313. <RowDefinition Height="24" />
  314. <RowDefinition Height="35" />
  315. <RowDefinition Height="24" />
  316. <RowDefinition Height="35" />
  317. <RowDefinition Height="24" />
  318. <RowDefinition Height="35" />
  319. <RowDefinition Height="*" />
  320. <RowDefinition Height="80" />
  321. <RowDefinition Height="*" />
  322. </Grid.RowDefinitions>
  323. <Grid.ColumnDefinitions>
  324. <ColumnDefinition Width="50" />
  325. <ColumnDefinition Width="*" />
  326. </Grid.ColumnDefinitions>
  327. <TextBlock
  328. x:Name="txbClass"
  329. Grid.Row="1"
  330. Grid.Column="0"
  331. Padding="0,0,0,0"
  332. VerticalAlignment="Center"
  333. Background="Transparent"
  334. FontSize="16"
  335. Foreground="Black"
  336. Text="班级:" />
  337. <ComboBox Cursor="Hand"
  338. x:Name="cmbClass"
  339. Grid.Row="1"
  340. Grid.Column="1"
  341. Height="auto"
  342. Margin="0,0,0,0"
  343. Padding="10,0,0,0"
  344. VerticalContentAlignment="Center"
  345. DisplayMemberPath="Value"
  346. Style="{StaticResource ComboBoxStyle}"
  347. FontSize="14"
  348. SelectedValuePath="Key">
  349. <ComboBox.Resources>
  350. <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="WhiteSmoke" />
  351. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
  352. </ComboBox.Resources>
  353. </ComboBox>
  354. <TextBlock
  355. x:Name="txbSubject"
  356. Grid.Row="3"
  357. Grid.Column="0"
  358. VerticalAlignment="Center"
  359. Background="Transparent"
  360. FontSize="16"
  361. Foreground="Black"
  362. Text="教材:" />
  363. <ComboBox Cursor="Hand"
  364. x:Name="book_list"
  365. Grid.Row="3"
  366. Grid.Column="1"
  367. Height="auto"
  368. Margin="0,0,0,0"
  369. Padding="10,0,0,0"
  370. Style="{StaticResource ComboBoxStyle}"
  371. VerticalContentAlignment="Center"
  372. DisplayMemberPath="Value"
  373. FontSize="14"
  374. ItemsSource="{Binding bookList}"
  375. SelectedValuePath="Key"
  376. SelectionChanged="toolbar_list_SelectionChanged">
  377. <ComboBox.Resources>
  378. <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="WhiteSmoke" />
  379. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
  380. </ComboBox.Resources>
  381. </ComboBox>
  382. <TextBlock
  383. x:Name="txbTeachingMaterial"
  384. Grid.Row="5"
  385. Grid.Column="0"
  386. VerticalAlignment="Center"
  387. Background="Transparent"
  388. FontSize="16"
  389. Foreground="Black"
  390. Text="章节:" />
  391. <ComboBox Cursor="Hand"
  392. x:Name="cmbTeachingMaterial"
  393. Grid.Row="5"
  394. Grid.Column="1"
  395. Padding="10,0,0,0"
  396. Style="{StaticResource ComboBoxStyle}"
  397. VerticalContentAlignment="Center"
  398. Background="White"
  399. DisplayMemberPath="Value"
  400. FontSize="14"
  401. Foreground="Black"
  402. ItemsSource="{Binding zhangjieList}"
  403. SelectedValuePath="Key" />
  404. <Button Cursor="Hand"
  405. x:Name="btnClassesBegin"
  406. Grid.Row="7"
  407. Grid.ColumnSpan="2"
  408. Width="328"
  409. Height="42"
  410. Click="btnClassesBegin_Click"
  411. Content="开始上课"
  412. FontSize="20"
  413. Foreground="White">
  414. <Button.Template>
  415. <ControlTemplate TargetType="{x:Type Button}">
  416. <Border
  417. BorderBrush="{TemplateBinding Control.BorderBrush}"
  418. BorderThickness="0"
  419. CornerRadius="21">
  420. <Border.Background>#2D8CF0</Border.Background>
  421. <ContentPresenter
  422. HorizontalAlignment="Center"
  423. VerticalAlignment="Center"
  424. Content="{TemplateBinding ContentControl.Content}" />
  425. </Border>
  426. </ControlTemplate>
  427. </Button.Template>
  428. </Button>
  429. </Grid>
  430. </Grid>
  431. </Grid>
  432. <StackPanel Orientation="Horizontal">
  433. <TextBlock
  434. x:Name="version_tb"
  435. Margin="10,0,0,10"
  436. HorizontalAlignment="Left"
  437. VerticalAlignment="Bottom"
  438. FontSize="16"
  439. Foreground="White"
  440. Text="测试版" />
  441. </StackPanel>
  442. <Button x:Name="btnSetUp" Height="25" Width="66" HorizontalAlignment="Right" Cursor="Hand" Margin="0,0,5,6" VerticalAlignment="Bottom" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnSetUp_Click" Visibility="Hidden">
  443. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  444. <Image Source=".\Images\Login\设置@2x.png"/>
  445. <TextBlock Text="设置" Foreground="White" FontSize="16" HorizontalAlignment="Right"
  446. VerticalAlignment="Bottom"/>
  447. </StackPanel>
  448. </Button>
  449. <!--<Button Content="Button" HorizontalAlignment="Left" Margin="380,79,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>-->
  450. </Grid>
  451. </Viewbox>
  452. </Window>