|
- <Window
- x:Class="HKCardOUT.Views.AdWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:Converter"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:hc="https://handyorg.github.io/handycontrol"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:view2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
- xmlns:viewModels="clr-namespace:HKCardOUT.ViewModels"
- Width="1920"
- Height="1080"
- d:DataContext="{d:DesignInstance Type=viewModels:AdWindowViewModel}"
- Background="#3f4c5d"
- WindowStyle="None"
- mc:Ignorable="d">
- <Window.Resources>
- <con:TextForegroundConvert x:Key="TextForegroundConvert" />
- <Style x:Key="Lbl" TargetType="TextBlock">
- <Setter Property="FontSize" Value="26" />
- <Setter Property="Margin" Value="0,5,0,10" />
- <!--<Setter Property="FontWeight" Value="Bold" />-->
- <Setter Property="Foreground" Value="SkyBlue" />
- </Style>
-
- <Style x:Key="borderStyle" TargetType="Border">
- <Setter Property="Background" Value="#AA00BEFA" />
- <Setter Property="CornerRadius" Value="10" />
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect
- BlurRadius="10"
- Direction="270"
- Opacity="0.4"
- ShadowDepth="5"
- Color="White" />
- </Setter.Value>
- </Setter>
- </Style>
-
- </Window.Resources>
-
-
- <Grid x:Name="alls">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width=".2*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width=".2*" />
- </Grid.ColumnDefinitions>
-
- <Grid x:Name="area1">
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition Height="0.2*" />
- <RowDefinition Height="0.2*" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid Margin="5">
- <Grid.Background>
- <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
- <GradientStop Color="#3f4c5d" />
- <GradientStop Offset="1" Color="#3f4c5d" />
- <GradientStop Offset="0.5" Color="#8800BEFA" />
- </LinearGradientBrush>
- </Grid.Background>
-
- <TextBlock
- HorizontalAlignment="Center"
- Foreground="#ddd"
- Style="{StaticResource Lbl}"
- Text="{Binding LAdInfo.Gate}" />
- </Grid>
-
- <Grid Grid.Row="1" Margin="5">
-
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <Border
- Grid.RowSpan="2"
- Grid.ColumnSpan="2"
- Style="{StaticResource borderStyle}">
- <Border.Background>
- <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#1FE6EC" />
- <GradientStop Offset="1" Color="#7850F1" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
-
-
-
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="22"
- Foreground="#ddd"
- Text="设备状态" />
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="45"
- Foreground="{Binding LAdInfo.Msg, Converter={StaticResource TextForegroundConvert}}"
- Text="{Binding LAdInfo.Msg}" />
-
- <TextBlock
- Grid.Row="1"
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="22"
- Foreground="#ddd"
- Text="今日刷卡量" />
-
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="60"
- Foreground="#ddd"
- Text="{Binding LAdInfo.Count}" />
- </Grid>
-
- <Grid Grid.Row="2" Margin="5">
- <Border Style="{StaticResource borderStyle}">
- <Border.Background>
- <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
- <!--<GradientStop Offset="1" Color="#C93ADA" />
- <GradientStop Offset="0" Color="#5844DD" />-->
- <GradientStop Offset="0" Color="#1FE6EC" />
- <GradientStop Offset="1" Color="#7850F1" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
-
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="50"
- Foreground="#ddd"
- Text="{Binding LAdInfo.Info.UserName}" />
- </Grid>
-
- <Grid Grid.Row="3" Margin="5">
- <Border Style="{StaticResource borderStyle}" />
- <ListBox
- Grid.Row="3"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding LAdInfo.AInfo}"
- Style="{StaticResource WrapPanelVerticalListBox}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="25"
- Foreground="#DDD"
- Style="{StaticResource Lbl}"
- Text="{Binding Time}" />
-
- <TextBlock
- FontSize="25"
- Foreground="#DDD"
- Style="{StaticResource Lbl}"
- Text=" -- " />
-
- <TextBlock
- Grid.Column="1"
- Margin="5,0,0,0"
- FontSize="25"
- Foreground="#DDD"
- Style="{StaticResource Lbl}"
- Text="{Binding UserName}" />
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </Grid>
-
- <Grid x:Name="content" Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height=".239*" />
- <RowDefinition Height=".5*" />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid Margin="5">
- <Grid.Background>
- <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
- <GradientStop Color="#3f4c5d" />
- <GradientStop Offset="1" Color="#3f4c5d" />
- <GradientStop Offset="0.5" Color="#8800BEFA" />
- </LinearGradientBrush>
- </Grid.Background>
-
- <TextBlock
- HorizontalAlignment="Center"
- FontSize="30"
- Foreground="#ddd"
- Style="{StaticResource Lbl}"
- Text="今日菜品" />
- </Grid>
- <ListBox
- Grid.Row="1"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding Foods, Mode=TwoWay}"
- Style="{StaticResource WrapPanelHorizontalListBox}">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="3" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Height="135" Margin="5">
- <Border Margin="10,0" Style="{StaticResource borderStyle}">
- <Border.Background>
- <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#1FE6EC" />
- <GradientStop Offset="1" Color="#7850F1" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
-
- <TextBlock
- VerticalAlignment="Center"
- FontSize="70"
- Foreground="#ddd"
- Style="{StaticResource Lbl}"
- Text="{Binding .}"
- TextAlignment="Center" />
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
-
- <view2:WebView2
- x:Name="view2"
- Grid.Row="1"
- Margin="5" />
- </Grid>
-
- <Grid Grid.Column="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition Height="0.2*" />
- <RowDefinition Height="0.2*" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid Margin="5">
- <Grid.Background>
- <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
- <GradientStop Offset="0" Color="#FF3f4c5d" />
- <GradientStop Offset="1" Color="#FF3f4c5d" />
- <GradientStop Offset="0.5" Color="#8800BEFA" />
- </LinearGradientBrush>
- </Grid.Background>
-
- <TextBlock
- HorizontalAlignment="Center"
- Foreground="#ddd"
- Style="{StaticResource Lbl}"
- Text="{Binding RAdinfo.Gate}" />
- </Grid>
-
- <Grid Grid.Row="1" Margin="5">
-
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <Border
- Grid.RowSpan="2"
- Grid.ColumnSpan="2"
- Style="{StaticResource borderStyle}">
- <Border.Background>
- <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#1FE6EC" />
- <GradientStop Offset="1" Color="#7850F1" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
-
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="22"
- Foreground="#ddd"
- Text="设备状态" />
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="45"
- Foreground="{Binding RAdinfo.Msg, Converter={StaticResource TextForegroundConvert}}"
- Text="{Binding RAdinfo.Msg}" />
-
- <TextBlock
- Grid.Row="1"
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="22"
- Foreground="#ddd"
- Text="今日刷卡量" />
-
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="60"
- Foreground="#ddd"
- Text="{Binding RAdinfo.Count}" />
- </Grid>
-
- <Grid Grid.Row="2" Margin="5">
- <Border Style="{StaticResource borderStyle}">
- <Border.Background>
- <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
- <!--<GradientStop Offset="1" Color="#C93ADA" />
- <GradientStop Offset="0" Color="#5844DD" />-->
- <GradientStop Offset="0" Color="#1FE6EC" />
- <GradientStop Offset="1" Color="#7850F1" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
-
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="50"
- Foreground="#ddd"
- Text="{Binding RAdinfo.Info.UserName}" />
- </Grid>
-
- <Grid Grid.Row="3" Margin="5">
- <Border Style="{StaticResource borderStyle}" />
- <ListBox
- Grid.Row="3"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding RAdinfo.AInfo}"
- Style="{StaticResource WrapPanelVerticalListBox}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="25"
- Foreground="#DDD"
- Style="{StaticResource Lbl}"
- Text="{Binding Time}" />
-
- <TextBlock
- FontSize="25"
- Foreground="#DDD"
- Style="{StaticResource Lbl}"
- Text=" -- " />
-
- <TextBlock
- Grid.Column="1"
- Margin="5,0,0,0"
- FontSize="25"
- Foreground="#DDD"
- Style="{StaticResource Lbl}"
- Text="{Binding UserName}" />
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </Grid>
-
- </Grid>
- </Window>
|