123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <Window x:Class="XHZB.Desktop.AttendanceWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:XHZB.Desktop"
- Width="1066"
- Height="768"
- AllowsTransparency="True"
- Closed="Window_Closed"
- Loaded="Window_Loaded"
-
- ResizeMode="NoResize"
- ShowInTaskbar="False"
- Unloaded="Window_Unloaded"
- WindowStartupLocation="CenterScreen"
- WindowState="Normal"
- WindowStyle="None"
- mc:Ignorable="d" BorderThickness="7">
- <Window.Effect>
- <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
- </Window.Effect>
- <Window.Background>
- <SolidColorBrush Opacity="1" />
- </Window.Background>
- <Window.Resources>
-
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- </Style>
- <Style x:Key="oiliu" TargetType="ListBoxItem">
- <!-- 设置控件模板 -->
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ListBoxItem">
- <Border
- Margin="4,0,0,0"
- Padding="0"
- Background="{TemplateBinding Background}">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- TextBlock.Foreground="{TemplateBinding Foreground}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="BigFontButtonStyle" TargetType="Button">
- <Style.Setters>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- x:Name="border"
- Padding="4,2"
- Background="{TemplateBinding Background}"
- BorderBrush="DarkGray"
- BorderThickness="1"
- CornerRadius="3">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- </Style>
- <DataTemplate x:Key="UserTpl">
- <StackPanel
- Width="109"
- Height="138"
- Background="Transparent">
- <Image
- Width="113"
- Height="113"
- HorizontalAlignment="Center"
- Source=".\Images\RollCall\attendance_3.png" />
- <StackPanel Margin="0,-115,0,0" Background="Transparent">
- <Image
- Width="55"
- Height="55"
- Margin="0,10,0,0"
- VerticalAlignment="Center"
- Source="{Binding Pic}"
- Stretch="Fill">
- <Image.Clip>
- <EllipseGeometry
- Center="27.5,27.5"
- RadiusX="27.5"
- RadiusY="27.5" />
- </Image.Clip>
- </Image>
- <TextBlock
- Padding="0,12,0,0"
- HorizontalAlignment="Center"
- FontSize="20"
- Foreground="#3C525B"
- Text="{Binding Name}" />
- </StackPanel>
- </StackPanel>
- </DataTemplate>
- </Window.Resources>
- <Grid>
- <Image Source=".\Images\RollCall\attendance_0_0_0.png" Stretch="Fill" />
- <Grid Margin="10,15,10,10">
- <Grid.RowDefinitions>
- <RowDefinition Height="70" />
- <RowDefinition Height="100" />
- <RowDefinition Height="*" />
- <RowDefinition Height="95" />
- <RowDefinition Height="64" />
- </Grid.RowDefinitions>
-
- <Grid Grid.Row="0" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" HorizontalAlignment="Center">
- <TextBlock
- Grid.Row="0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="30"
- Foreground="White"
- Text=" 在线学生 "/>
- </Grid>
-
- <StackPanel
- Grid.Row="1"
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock FontSize="26" Text="在线人数:" />
- <TextBlock
- x:Name="txbOnlineUsers"
- Margin="0,0,0,0"
- FontSize="31"
- FontWeight="Black"
- Foreground="#136EFB"
- Text="0" />
- <TextBlock
- Margin="0,0,0,0"
- FontSize="31"
- Foreground="#333333"
- Text="/" />
- <TextBlock
- x:Name="txbTotalPeople"
- Margin="0,0,0,0"
- Padding="0,2,0,0"
- FontSize="28"
- Foreground="#333333"
- Text="0" />
- </StackPanel>
-
- <ListBox
- x:Name="toolbar_list"
- Grid.Row="2"
- Margin="5,0,5,0"
- Background="#f3f3f3"
- BorderThickness="0"
- ItemContainerStyle="{DynamicResource oiliu}"
- ItemTemplate="{StaticResource UserTpl}"
- ItemsSource="{Binding menuList}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Disabled">
- <ListBox.Template>
- <ControlTemplate TargetType="{x:Type ListBox}">
- <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
- <WrapPanel
- IsItemsHost="True"
- Orientation="Horizontal"
- ScrollViewer.CanContentScroll="True" />
- </ScrollViewer>
- </ControlTemplate>
- </ListBox.Template>
- </ListBox>
- <Grid x:Name="gridImg" Grid.Row="2" Visibility="Collapsed">
- <Image x:Name="img"/>
- </Grid>
- <Viewbox Grid.Row="3">
- <Border
- Grid.Row="3"
- Margin="25,0,25,0"
- Background="#dee2e1"
- CornerRadius="5">
- <Border
- Margin="1,1,1,1"
- Background="#FFFFFF"
- CornerRadius="5">
- <StackPanel
- Grid.Row="3"
- Margin="0,5,0,5"
- Orientation="Horizontal">
- <TextBlock
- Padding="3,0,0,0"
- FontSize="20.5"
- Foreground="#FF0000"
- Text="●" />
- <TextBlock
- Padding="3,3,0,0"
- FontSize="16.5"
- Foreground="#333333"
- Text="未上线:" />
- <TextBlock
- x:Name="txbNotOnline"
- Width="1160" MinWidth="900"
- Padding="3,3,0,0"
- FontSize="16.5"
- Foreground="#999999"
- Text="暂无"
- TextWrapping="Wrap" />
- </StackPanel>
- </Border>
- </Border>
- </Viewbox>
- <Button Cursor="Hand"
- x:Name="btnEnd"
- Grid.Row="4"
- Width="336"
- Height="46"
- HorizontalAlignment="Center"
- Background="White"
- Click="btnEnd_Click"
- Content="关闭"
- FontSize="22"
- FontWeight="Black"
- Foreground="White"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- Background="#6098FF"
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="1"
- CornerRadius="23">
-
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </Grid>
- </Window>
|