星火直播PC
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

UserCenterWindow.xaml 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. <Window x:Class="XHZB.Desktop.UserCenterWindow"
  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:Views="clr-namespace:Common.ZB;assembly=Common" xmlns:cv="clr-namespace:XHZB.Desktop.Utils"
  7. Title="星火智慧校园"
  8. Width="1066"
  9. Height="768"
  10. AllowsTransparency="True"
  11. Closing="Window_Closing"
  12. WindowStartupLocation="CenterScreen"
  13. WindowStyle="None"
  14. mc:Ignorable="d" BorderThickness="1">
  15. <Window.Effect>
  16. <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
  17. </Window.Effect>
  18. <Window.Background>
  19. <SolidColorBrush Opacity="1" />
  20. </Window.Background>
  21. <Window.Resources>
  22. <!--Combox右侧下拉按钮-->
  23. <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate>
  27. <!--下拉按钮内部背景色-->
  28. <Border x:Name="Back" Background="Transparent" BorderThickness="1" BorderBrush="Transparent">
  29. <!--下拉按钮内边框-->
  30. <Label Name="PathFill" Content="ˇ" FontSize="32" Padding="0,16,3,0" HorizontalAlignment="Right">
  31. </Label>
  32. </Border>
  33. <ControlTemplate.Triggers>
  34. <Trigger Property="IsMouseOver" Value="True">
  35. <Setter TargetName="Back" Property="Background" Value="Transparent"></Setter>
  36. <Setter TargetName="Back" Property="BorderBrush" Value="Transparent"></Setter>
  37. </Trigger>
  38. </ControlTemplate.Triggers>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. <!--Combox-->
  44. <Style TargetType="ComboBox" x:Key="ComboBoxStyle">
  45. <Setter Property="ItemContainerStyle">
  46. <Setter.Value>
  47. <!--ComBoxItem-->
  48. <Style TargetType="ComboBoxItem">
  49. <Setter Property="MinHeight" Value="50"></Setter>
  50. <Setter Property="MinWidth" Value="60"></Setter>
  51. <Setter Property="Template">
  52. <Setter.Value>
  53. <ControlTemplate TargetType="ComboBoxItem">
  54. <Border Name="Back" Background="Transparent" BorderThickness="0,0,0,0" BorderBrush="#f3f3f3">
  55. <ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" ></ContentPresenter>
  56. </Border>
  57. <ControlTemplate.Triggers>
  58. <Trigger Property="IsMouseOver" Value="True">
  59. <Setter TargetName="Back" Property="Background" Value="#f3f3f3"></Setter>
  60. </Trigger>
  61. <!--下拉框背景色-->
  62. <Trigger Property="IsHighlighted" Value="True">
  63. <Setter TargetName="Back" Property="Background" Value="#f3f3f3"></Setter>
  64. </Trigger>
  65. </ControlTemplate.Triggers>
  66. </ControlTemplate>
  67. </Setter.Value>
  68. </Setter>
  69. </Style>
  70. </Setter.Value>
  71. </Setter>
  72. <Setter Property="Template">
  73. <Setter.Value>
  74. <ControlTemplate TargetType="ComboBox">
  75. <Grid>
  76. <Grid.ColumnDefinitions>
  77. </Grid.ColumnDefinitions>
  78. <Border Grid.Column="0" BorderThickness="0.6" BorderBrush="#c0c0c0" CornerRadius="1,0,0,1" Background="#edeeee">
  79. </Border>
  80. <!--文字区域背景和边线样式-->
  81. <TextBox Background="#edeeee" Padding="10,0,0,0" VerticalAlignment="Center" Grid.Column="0" Foreground="Black" BorderBrush="#c0c0c0" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}"></TextBox>
  82. <!--右侧下拉button设置-->
  83. <Border Grid.Column="1" BorderThickness="0,0.6,0.6,0.6" BorderBrush="#c0c0c0" CornerRadius="0,1,1,0" >
  84. <ToggleButton BorderThickness="3" BorderBrush="Black" Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
  85. </Border>
  86. <!--弹出popup整体设置-->
  87. <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
  88. <!--弹出popup边框-->
  89. <Border CornerRadius="1" BorderBrush="#d2d2d2" BorderThickness="1,0,1,1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
  90. <Border.Effect>
  91. <DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="1"/>
  92. </Border.Effect>
  93. <!--下拉幕布边界背景设置 MaxHeight="{TemplateBinding MaxDropDownHeight}"-->
  94. <ScrollViewer Margin="0,0,0,0" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderBrush="#17acae" BorderThickness="2" >
  95. <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
  96. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="#FFFFFF"/>
  97. </ScrollViewer>
  98. </Border>
  99. </Popup>
  100. </Grid>
  101. </ControlTemplate>
  102. </Setter.Value>
  103. </Setter>
  104. </Style>
  105. <cv:ColorBgConverter x:Key="colorBgConvert" />
  106. <cv:ColorTextConverter x:Key="colorTextConvert" />
  107. <Style x:Key="ButtonStyle">
  108. <Setter Property="Button.Width" Value="35"/>
  109. <Setter Property="Button.Height" Value="35"/>
  110. <Setter Property="Button.Margin" Value="3,0,0,0"/>
  111. </Style>
  112. <Style x:Key="ListBoxItemContainerStyle" TargetType="{x:Type ListBoxItem}">
  113. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  114. <Setter Property="HorizontalAlignment" Value="Stretch" />
  115. <Setter Property="Template">
  116. <Setter.Value>
  117. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  118. <Border
  119. Background="Transparent"
  120. BorderBrush="Transparent"
  121. BorderThickness="0">
  122. <ContentPresenter />
  123. </Border>
  124. <ControlTemplate.Triggers />
  125. </ControlTemplate>
  126. </Setter.Value>
  127. </Setter>
  128. </Style>
  129. <DataTemplate x:Key="zhangjieDt">
  130. <Border
  131. Grid.Column="1"
  132. Grid.ColumnSpan="3"
  133. Height="Auto"
  134. Background="White"
  135. CornerRadius="0,0,0,0">
  136. <Grid>
  137. <Button Cursor="Hand"
  138. Margin="0,0,0,0"
  139. HorizontalAlignment="Stretch"
  140. Click="zhangjieClick"
  141. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  142. Tag="{Binding}">
  143. <Button.Template>
  144. <ControlTemplate TargetType="{x:Type Button}">
  145. <Border
  146. BorderBrush="{TemplateBinding Control.BorderBrush}"
  147. BorderThickness="0"
  148. CornerRadius="0">
  149. <ContentPresenter VerticalAlignment="Center" Content="{TemplateBinding ContentControl.Content}" />
  150. </Border>
  151. </ControlTemplate>
  152. </Button.Template>
  153. <TextBlock
  154. Padding="13" FontSize="13"
  155. Background="{Binding selected, Converter={StaticResource colorBgConvert}}"
  156. Foreground="{Binding selected, Converter={StaticResource colorTextConvert}}"
  157. Text="{Binding directorname}" />
  158. </Button>
  159. </Grid>
  160. </Border>
  161. </DataTemplate>
  162. <DataTemplate x:Key="ToolbarMenu">
  163. <Border Grid.Column="1"
  164. Grid.ColumnSpan="3"
  165. Height="100"
  166. Margin="10,15,10,0"
  167. Background="#edeeee"
  168. CornerRadius="6">
  169. <Border
  170. Margin="2"
  171. Background="White"
  172. CornerRadius="6">
  173. <Grid Height="100" >
  174. <Grid.ColumnDefinitions>
  175. <ColumnDefinition Width="80" />
  176. <ColumnDefinition Width="*" />
  177. <ColumnDefinition Width="160" />
  178. </Grid.ColumnDefinitions>
  179. <Image
  180. x:Name="imgResourceMyList"
  181. Grid.Column="0"
  182. Height="80"
  183. Margin="15,0,0,0"
  184. Source="{Binding Pic, Mode=TwoWay}" />
  185. <Grid Grid.Column="1">
  186. <Grid.RowDefinitions>
  187. <RowDefinition Height="*" />
  188. <RowDefinition Height="*" />
  189. </Grid.RowDefinitions>
  190. <Grid.ColumnDefinitions>
  191. <ColumnDefinition Width="*" />
  192. </Grid.ColumnDefinitions>
  193. <TextBlock
  194. x:Name="txbFileName"
  195. Grid.Row="0"
  196. Margin="15,15,0,0"
  197. VerticalAlignment="Center"
  198. FontSize="20"
  199. Text="{Binding ResourceName, Mode=TwoWay}" />
  200. <StackPanel
  201. Grid.Row="1"
  202. Margin="15,0,0,2"
  203. Orientation="Horizontal">
  204. <TextBlock
  205. Margin="5,0,0,0"
  206. VerticalAlignment="Center"
  207. FontSize="16"
  208. Text="大小: " />
  209. <TextBlock
  210. Margin="5,0,0,0"
  211. VerticalAlignment="Center"
  212. FontSize="16"
  213. Text="{Binding Resourcesize, Mode=TwoWay}" />
  214. <TextBlock
  215. Margin="15,0,0,0"
  216. VerticalAlignment="Center"
  217. FontSize="16"
  218. Text="时间: " />
  219. <TextBlock
  220. Margin="5,2,0,0"
  221. VerticalAlignment="Center"
  222. FontSize="16"
  223. Text="{Binding Times, Mode=TwoWay}" />
  224. <TextBlock
  225. Margin="15,0,0,0"
  226. VerticalAlignment="Center"
  227. FontSize="16"
  228. Text="时长: "
  229. Visibility="{Binding VisDuration}" />
  230. <TextBlock
  231. Margin="5,0,0,0"
  232. VerticalAlignment="Center"
  233. FontSize="16"
  234. Text="{Binding Duration}"
  235. Visibility="{Binding VisDuration}" />
  236. </StackPanel>
  237. </Grid>
  238. <Button
  239. x:Name="btnDownload"
  240. Grid.Column="2"
  241. Width="100"
  242. Height="46"
  243. Margin="0,0,15,0"
  244. Padding="0,0,0,0"
  245. HorizontalAlignment="Right"
  246. Click="btnDownload_Click"
  247. Cursor="Hand"
  248. FontSize="16"
  249. Foreground="#FFFFFF"
  250. Tag="{Binding Resourceid}"
  251. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  252. <StackPanel Orientation="Horizontal" Visibility="{Binding VisDownload}">
  253. <TextBlock
  254. Margin="0,0,0,0"
  255. FontSize="18"
  256. Foreground="#FFFFFF"
  257. Text="下载" />
  258. </StackPanel>
  259. <Button.Template>
  260. <ControlTemplate TargetType="{x:Type Button}">
  261. <Border
  262. BorderBrush="{TemplateBinding Control.BorderBrush}"
  263. BorderThickness="1"
  264. CornerRadius="8">
  265. <Border.Background>#6098FF</Border.Background>
  266. <ContentPresenter
  267. HorizontalAlignment="Center"
  268. VerticalAlignment="Center"
  269. Content="{TemplateBinding ContentControl.Content}" />
  270. </Border>
  271. </ControlTemplate>
  272. </Button.Template>
  273. </Button>
  274. <Button
  275. x:Name="btnTurnOn"
  276. Grid.Column="2"
  277. Width="100"
  278. Height="46"
  279. Margin="0,0,15,0"
  280. Padding="0,0,0,0"
  281. HorizontalAlignment="Right"
  282. Click="btnTurnOn_Click"
  283. Cursor="Hand"
  284. FontSize="16"
  285. Foreground="#FFFFFF"
  286. Tag="{Binding Resourceid}"
  287. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  288. Visibility="{Binding VisButton}">
  289. <StackPanel Orientation="Horizontal">
  290. <TextBlock
  291. Margin="0,0,0,0"
  292. FontSize="18"
  293. Foreground="#FFFFFF"
  294. Text="打开" />
  295. </StackPanel>
  296. <Button.Template>
  297. <ControlTemplate TargetType="{x:Type Button}">
  298. <Border
  299. BorderBrush="{TemplateBinding Control.BorderBrush}"
  300. BorderThickness="1"
  301. CornerRadius="8">
  302. <Border.Background>#FC854B</Border.Background>
  303. <ContentPresenter
  304. HorizontalAlignment="Center"
  305. VerticalAlignment="Center"
  306. Content="{TemplateBinding ContentControl.Content}" />
  307. </Border>
  308. </ControlTemplate>
  309. </Button.Template>
  310. </Button>
  311. </Grid>
  312. </Border>
  313. </Border>
  314. </DataTemplate>
  315. </Window.Resources>
  316. <Grid
  317. Width="1066"
  318. Height="768"
  319. Margin="0,0,0,0"
  320. Visibility="Visible">
  321. <Views:ClippingBorder
  322. Background="#fafafa"
  323. BorderBrush="#33000000"
  324. BorderThickness="1"
  325. CornerRadius="20">
  326. <Grid>
  327. <Grid.RowDefinitions>
  328. <RowDefinition Height="64" />
  329. <RowDefinition Height="*" />
  330. </Grid.RowDefinitions>
  331. <Grid
  332. Grid.Row="0"
  333. Background="#4597FF"
  334. MouseMove="Window_MouseMove">
  335. <TextBlock
  336. Grid.Row="0"
  337. Margin="15,0,0,0"
  338. HorizontalAlignment="Left"
  339. VerticalAlignment="Center"
  340. FontSize="26"
  341. Foreground="White"
  342. Text="个人空间" />
  343. <Button Cursor="Hand"
  344. x:Name="btnDown"
  345. Grid.Column="0"
  346. Width="46"
  347. Height="46"
  348. Margin="0,0,10,0"
  349. HorizontalAlignment="Right"
  350. VerticalAlignment="Center"
  351. Background="White"
  352. Click="btnDown_Click"
  353. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  354. <Button.Template>
  355. <ControlTemplate TargetType="{x:Type Button}">
  356. <Border
  357. BorderBrush="{TemplateBinding Control.BorderBrush}"
  358. BorderThickness="0"
  359. CornerRadius="20">
  360. <ContentPresenter
  361. HorizontalAlignment="Center"
  362. VerticalAlignment="Center"
  363. Content="{TemplateBinding ContentControl.Content}" />
  364. </Border>
  365. </ControlTemplate>
  366. </Button.Template>
  367. <Image
  368. Width="40"
  369. Height="40"
  370. HorizontalAlignment="Center"
  371. VerticalAlignment="Center"
  372. Source="./Images/RollCall/rollCall_1.png"
  373. Stretch="Fill" />
  374. </Button>
  375. </Grid>
  376. <Grid Grid.Row="1">
  377. <Grid.ColumnDefinitions>
  378. <ColumnDefinition Width="300" />
  379. <ColumnDefinition Width="3*" />
  380. </Grid.ColumnDefinitions>
  381. <!-- 区域 左 -->
  382. <Border
  383. Grid.Column="0"
  384. Margin="0,0,0,0"
  385. Background="#FFFFFF"
  386. CornerRadius="0,0,20,0">
  387. <Grid Grid.Column="0">
  388. <Grid.RowDefinitions>
  389. <RowDefinition Height="50" />
  390. <RowDefinition Height="*" />
  391. </Grid.RowDefinitions>
  392. <ComboBox Cursor="Hand"
  393. x:Name="cmbClass"
  394. Grid.Row="0"
  395. Padding="10,0,10,0"
  396. Style="{StaticResource ComboBoxStyle}"
  397. VerticalContentAlignment="Center"
  398. BorderThickness="0"
  399. DisplayMemberPath="Value"
  400. FontSize="16"
  401. ItemsSource="{Binding bookList}"
  402. SelectedValuePath="Key"
  403. SelectionChanged="cmbClass_SelectionChanged" />
  404. <ListBox
  405. Grid.Row="1"
  406. Margin="0,0,0,0"
  407. Background="#FAFAFA"
  408. BorderThickness="0"
  409. ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle}"
  410. ItemTemplate="{StaticResource zhangjieDt}"
  411. ItemsSource="{Binding zhangjieList}"
  412. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  413. ScrollViewer.VerticalScrollBarVisibility="Visible" />
  414. </Grid>
  415. </Border>
  416. <Grid Grid.Column="1">
  417. <Grid.RowDefinitions>
  418. <RowDefinition Height="50" />
  419. <RowDefinition Height="*" />
  420. </Grid.RowDefinitions>
  421. <StackPanel
  422. Grid.Row="0"
  423. Grid.Column="1"
  424. Margin="0,0,0,0"
  425. Background="#fafafa"
  426. Orientation="Horizontal">
  427. <TextBlock
  428. Padding="20,20,0,0"
  429. FontSize="16"
  430. Text="类型:" />
  431. <Border x:Name="borAll" CornerRadius="6" Width="72" Height="40" Background="DodgerBlue" Margin="0,6,10,0">
  432. <Button Cursor="Hand" Foreground="White"
  433. x:Name="btnAll" Height="40"
  434. Width="72"
  435. Padding="0,10,0,10"
  436. Click="btnAll_Click"
  437. Content="全部"
  438. FontSize="16"
  439. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" >
  440. </Button>
  441. </Border>
  442. <Border x:Name="borAudio" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
  443. <Button Cursor="Hand"
  444. x:Name="btnAudio"
  445. Width="72"
  446. Padding="0,10,0,10"
  447. Click="btnAudio_Click"
  448. Content="音频"
  449. FontSize="16"
  450. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  451. </Border>
  452. <Border x:Name="borVideo" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
  453. <Button Cursor="Hand"
  454. x:Name="btnVideo"
  455. Width="72"
  456. Padding="0,10,0,10"
  457. Click="btnVideo_Click"
  458. Content="视频"
  459. FontSize="16"
  460. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  461. </Border>
  462. <Border x:Name="borImage" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
  463. <Button Cursor="Hand"
  464. x:Name="btnImage"
  465. Width="72"
  466. Padding="0,10,0,10"
  467. Click="btnImage_Click"
  468. Content="图片"
  469. FontSize="16"
  470. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  471. />
  472. </Border>
  473. <Border x:Name="borDoc" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
  474. <Button Cursor="Hand"
  475. x:Name="btnDoc"
  476. Width="72"
  477. Padding="0,10,0,10"
  478. Click="btnDoc_Click"
  479. Content="文档"
  480. FontSize="16"
  481. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  482. </Border>
  483. </StackPanel>
  484. <ListBox
  485. x:Name="toolbar_list"
  486. Grid.Row="1"
  487. Margin="0,0,0,0"
  488. Background="#FAFAFA"
  489. BorderThickness="0"
  490. ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle}"
  491. ItemTemplate="{StaticResource ToolbarMenu}"
  492. ItemsSource="{Binding menuList}"
  493. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  494. ScrollViewer.VerticalScrollBarVisibility="Visible" />
  495. </Grid>
  496. </Grid>
  497. </Grid>
  498. </Views:ClippingBorder>
  499. <Views:ClippingBorder
  500. x:Name="tip_outer"
  501. Width="760"
  502. Height="44"
  503. Margin="0,0,0,0"
  504. HorizontalAlignment="Center"
  505. VerticalAlignment="Center"
  506. Background="#FAFAFA"
  507. CornerRadius="4"
  508. Visibility="Collapsed">
  509. <Grid>
  510. <ProgressBar BorderBrush="#4597FF"
  511. Foreground="#4597FF"
  512. Grid.Row="0"
  513. x:Name="pgbProcess"
  514. Height="20"
  515. Margin="10"
  516. Visibility="Visible" />
  517. <Label Grid.Row="0"
  518. HorizontalAlignment="Center" Width="160"
  519. x:Name="lbProcess"
  520. Height="30"
  521. Margin="0,0,0,0"
  522. FontSize="16"
  523. Content=""
  524. Foreground="White"
  525. Visibility="Visible" />
  526. </Grid>
  527. </Views:ClippingBorder>
  528. </Grid>
  529. </Window>