123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- <Window x:Class="XHZB.Desktop.RollCallWindow"
- 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"
- Title="RollCallWindow" Width="1066"
- Height="768"
- AllowsTransparency="True"
- Closed="Window_Closed"
- Opacity="1"
- ShowInTaskbar="False"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d" BorderThickness="7">
- <Window.Effect>
- <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
- </Window.Effect>
- <Window.Background>
- <SolidColorBrush Opacity="0" Color="#000000" />
- </Window.Background>
- <Window.Resources>
-
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- </Style>
- <Style x:Key="MyItemContainStyle" 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="UserItemTemp">
- <Grid
- Width="90"
- Height="125"
- Margin="9,20,9,10">
- <Image
- Width="90"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- Source="{Binding Attendance}"
- Visibility="{Binding Attendance_3}" />
- <Image
- Width="90"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- Source=".\Images\RollCall\attendance_33.png"
- Visibility="{Binding Attendance_33}" />
-
- <StackPanel
- Margin="0,0,0,0"
- VerticalAlignment="Center"
- Background="Transparent">
- <Image
- Width="55"
- Height="55"
- HorizontalAlignment="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>
- <Image
- x:Name="imgMedal"
- Width="42"
- Margin="0,-15,-10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Source="{Binding Medal}" />
- </Grid>
- </DataTemplate>
- </Window.Resources>
-
- <Grid>
- <Image Source=".\Images\RollCall\attendance_0_0_0.png" Stretch="Fill" />
- <Grid Margin="10,36,10,10">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="76" />
- <RowDefinition Height="*" />
- <RowDefinition Height="95" />
- <RowDefinition Height="64" />
- </Grid.RowDefinitions>
-
- <!-- 头部 -->
- <Grid Grid.Row="0" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
- <TextBlock
- Grid.Row="0"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="30"
- Foreground="White"
- Text=" 直播点名抢答 " />
- </Grid>
- <UniformGrid
- Grid.Row="1"
- Columns="2"
- Rows="1">
- <Button Cursor="Hand"
- x:Name="btnRandomRollCall"
- Width="223"
- Height="55"
- Margin="220,0,0,0"
- VerticalAlignment="Bottom"
- BorderThickness="0"
- Click="btnRandomRollCall_Click"
- FontSize="26"
- Foreground="White">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Image
- x:Name="imgRandomRollCall"
- Grid.Row="0"
- Source=".\Images\RollCall\rollCall_10.png" />
- <Image
- x:Name="imgRandomRollCallTwo"
- Grid.Row="0"
- Source=".\Images\RollCall\rollCall_11.png"
- Visibility="Collapsed" />
-
- <TextBlock
- Grid.Row="0"
- Padding="50,5,0,0"
- HorizontalAlignment="Center"
- Foreground="White"
- Text="随机点名" />
- <Image
- Grid.Row="0"
- Width="31"
- Margin="40,0,0,0"
- HorizontalAlignment="Left"
- Source=".\Images\RollCall\rollCall_13.png" />
- </Grid>
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="27,27,27,27">
- <Border.Background>#FFFFFF</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button
- x:Name="btnAnswer"
- Width="223"
- Height="55"
- Margin="0,0,220,0"
- VerticalAlignment="Bottom"
- Click="btnAnswer_Click"
- Cursor="Hand"
- FontSize="26"
- Foreground="White">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Image
- x:Name="imgAnswer"
- Grid.Row="0"
- Source=".\Images\RollCall\rollCall_10.png" />
- <Image
- x:Name="imgAnswerTwo"
- Grid.Row="0"
- Source=".\Images\RollCall\rollCall_11.png"
- Visibility="Collapsed" />
-
- <TextBlock
- Grid.Row="0"
- Padding="50,5,0,0"
- HorizontalAlignment="Center"
- Foreground="White"
- Text="开始抢答" />
- <Image
- Grid.Row="0"
- Width="31"
- Margin="40,0,0,0"
- HorizontalAlignment="Left"
- Source=".\Images\RollCall\rollCall_12.png" />
- </Grid>
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="27,27,27,27">
- <Border.Background>#FFFFFF</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </UniformGrid>
- <Grid Grid.Row="2">
- <ListBox
- x:Name="toolbar_list"
- Margin="10,0,10,0"
- Background="#f3f3f3"
- BorderThickness="0"
- ItemContainerStyle="{DynamicResource MyItemContainStyle}"
- ItemTemplate="{StaticResource UserItemTemp}"
- ItemsSource="{Binding userList}"
- 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>
- <StackPanel
- x:Name="stpAnswer"
- Margin="0,350,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal"
- Visibility="Collapsed">
- <TextBlock FontSize="30" Text="共" />
- <TextBlock
- x:Name="txbNumberOfReplies"
- FontSize="30"
- Foreground="#136EFB"
- Text="0" />
- <TextBlock FontSize="30" Text="人抢答" />
- </StackPanel>
- </Grid>
- <Viewbox Grid.Row="3">
- <Border
- Grid.Row="3"
- Margin="33,0,33,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"
- MinWidth="900"
- Width="1180"
- Padding="3,3,0,0"
- FontSize="16.5"
- Foreground="#999999"
- Text="暂无"
- TextWrapping="Wrap" />
- </StackPanel>
- </Border>
- </Border>
- </Viewbox>
- <Grid Grid.Row="4">
- <Button
- Width="336"
- Height="55"
- VerticalAlignment="Center"
- Click="btnDown_Click"
- Content="关闭"
- Cursor="Hand"
- FontSize="24"
- FontWeight="Black"
- Foreground="White">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="27,27,27,27">
- <Border.Background>#6098FF</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </Grid>
- </Grid>
- </Window>
|