Files
petwash/PetWashControl/Views/MainWindow.xaml
2026-02-28 10:24:18 +08:00

2320 lines
146 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Window x:Class="PetWashControl.Views.MainWindow"
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:PetWashControl.Views"
xmlns:converters="clr-namespace:PetWashControl.Converters"
mc:Ignorable="d"
Title="全自动洗宠机"
Height="800" Width="1280"
WindowStyle="None"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen">
<Window.Resources>
<!-- 转换器 -->
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<converters:InverseBoolToVisibilityConverter x:Key="InverseBoolToVisibilityConverter"/>
<converters:ProgressToWidthConverter x:Key="ProgressToWidthConverter"/>
<!-- 渐变背景 -->
<LinearGradientBrush x:Key="MainBackgroundBrush" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#A8E6CF" Offset="0"/>
<GradientStop Color="#DCEDC8" Offset="0.5"/>
<GradientStop Color="#B2DFDB" Offset="1"/>
</LinearGradientBrush>
<!-- 圆角按钮样式 -->
<Style x:Key="RoundButton" TargetType="Button">
<Setter Property="Background" Value="#FFD54F"/>
<Setter Property="Foreground" Value="#5D4037"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
CornerRadius="25"
Padding="{TemplateBinding Padding}">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#FFCA28"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="#FFC107"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 套餐卡片样式 -->
<Style x:Key="PackageCard" TargetType="Border">
<Setter Property="Background" Value="#D84315"/>
<Setter Property="CornerRadius" Value="15"/>
<Setter Property="Padding" Value="20,15"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#000000" BlurRadius="10" ShadowDepth="4" Opacity="0.4"/>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Window.Background>
<StaticResource ResourceKey="MainBackgroundBrush"/>
</Window.Background>
<Grid>
<!-- 装饰性圆圈 -->
<Canvas>
<Ellipse Width="120" Height="120" Fill="#FFD54F" Opacity="0.6" Canvas.Left="50" Canvas.Top="50">
<Ellipse.Effect>
<BlurEffect Radius="20"/>
</Ellipse.Effect>
</Ellipse>
<Ellipse Width="150" Height="150" Fill="#81C784" Opacity="0.5" Canvas.Right="80" Canvas.Top="80">
<Ellipse.Effect>
<BlurEffect Radius="25"/>
</Ellipse.Effect>
</Ellipse>
</Canvas>
<!-- 主内容区域 -->
<Grid x:Name="MainContent">
<!-- 待机界面 -->
<Grid x:Name="IdleView" Visibility="Visible">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 顶部标题栏 -->
<Border Grid.Row="0" Padding="30,20">
<Grid>
<!-- 左侧:设备信息和时间 -->
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
<Border
CornerRadius="12"
Padding="15,8"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="{Binding DeviceNumber}"
FontSize="14"
FontWeight="SemiBold"
Foreground="#1B5E20"
Margin="0,0,0,4"/>
<!--<TextBlock Text="{Binding CurrentDateTime}"
FontSize="16"
FontWeight="Bold"
Foreground="#2E7D32"
Margin="0,0,0,2"/>
<TextBlock Text="{Binding CurrentDayOfWeek}"
FontSize="13"
Foreground="#558B2F"/>-->
</StackPanel>
</Border>
</StackPanel>
<!-- 中间:标题 -->
<TextBlock Text="全自动洗宠机"
FontSize="48"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FFFFFF" BlurRadius="10" ShadowDepth="0" Opacity="0.8"/>
</TextBlock.Effect>
</TextBlock>
<!-- 右侧:设置按钮 -->
<Button Content="⚙"
FontSize="32"
Width="60"
Height="60"
Background="#FFD54F"
Foreground="#5D4037"
BorderThickness="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding ShowSettingsCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="30">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Border>
<!-- 中间欢迎区域 -->
<Grid Grid.Row="1" Margin="40,20,40,20">
<!-- 待机状态:左右布局 -->
<Grid Visibility="{Binding IsDoorOpen, Converter={StaticResource InverseBoolToVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 左侧:大图展示区 -->
<Border Grid.Column="0"
Background="White"
CornerRadius="30"
Padding="20"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="6" Opacity="0.4"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 顶部装饰条 -->
<Border Grid.Row="0"
Background="#81C784"
CornerRadius="15"
Padding="20,12"
Margin="0,0,0,20">
<Border.Effect>
<DropShadowEffect Color="#4CAF50" BlurRadius="10" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="🐾 专业宠物洗护服务"
FontSize="24"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"/>
</Border>
<!-- 宠物大图轮播 -->
<Border Grid.Row="1"
Background="#F5F5F5"
CornerRadius="4"
BorderBrush="#81C784"
BorderThickness="4"
ClipToBounds="True">
<Border.Effect>
<DropShadowEffect Color="#4CAF50" BlurRadius="15" ShadowDepth="0" Opacity="0.4"/>
</Border.Effect>
<Image Source="{Binding CurrentCarouselImage}"
Stretch="UniformToFill"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity"
From="0" To="1"
Duration="0:0:0.5"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Border>
</Grid>
</Border>
<!-- 右侧:欢迎信息和操作区 -->
<Border Grid.Column="2"
Background="White"
CornerRadius="30"
Padding="30,25"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="6" Opacity="0.4"/>
</Border.Effect>
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
Padding="5,0">
<StackPanel>
<!-- 欢迎标题 -->
<TextBlock Text="欢迎使用"
FontSize="24"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
Margin="0,10,0,8"
TextWrapping="Wrap">
<TextBlock.Effect>
<DropShadowEffect Color="#81C784" BlurRadius="8" ShadowDepth="0" Opacity="0.6"/>
</TextBlock.Effect>
</TextBlock>
<TextBlock Text="全自动洗宠机"
FontSize="30"
FontWeight="Bold"
Foreground="#1B5E20"
HorizontalAlignment="Center"
Margin="0,0,0,20"
TextWrapping="Wrap">
<TextBlock.Effect>
<DropShadowEffect Color="#81C784" BlurRadius="10" ShadowDepth="0" Opacity="0.6"/>
</TextBlock.Effect>
</TextBlock>
<!-- 服务特点 -->
<Border Background="#E8F5E9"
CornerRadius="15"
Padding="18,12"
Margin="0,0,0,18">
<StackPanel>
<TextBlock FontSize="15" Foreground="#2E7D32" Margin="0,0,0,6" TextWrapping="Wrap">
<Run Text="✓" FontWeight="Bold" FontSize="16"/>
<Run Text=" 专业洗护配方"/>
</TextBlock>
<TextBlock FontSize="15" Foreground="#2E7D32" Margin="0,0,0,6" TextWrapping="Wrap">
<Run Text="✓" FontWeight="Bold" FontSize="16"/>
<Run Text=" 智能温控系统"/>
</TextBlock>
<TextBlock FontSize="15" Foreground="#2E7D32" Margin="0,0,0,6" TextWrapping="Wrap">
<Run Text="✓" FontWeight="Bold" FontSize="16"/>
<Run Text=" 安全舒适体验"/>
</TextBlock>
<TextBlock FontSize="15" Foreground="#2E7D32" TextWrapping="Wrap">
<Run Text="✓" FontWeight="Bold" FontSize="16"/>
<Run Text=" 快速高效便捷"/>
</TextBlock>
</StackPanel>
</Border>
<!-- 副标题 -->
<TextBlock Text="让您的爱宠享受专业洗护服务"
FontSize="16"
Foreground="#558B2F"
HorizontalAlignment="Center"
Margin="0,0,0,25"
TextWrapping="Wrap"
TextAlignment="Center"/>
<!-- 开始按钮 -->
<Button Content="点击开始"
Height="70"
FontSize="28"
FontWeight="Bold"
Style="{StaticResource RoundButton}"
Command="{Binding ShowPaymentCommand}"
Margin="0,0,0,15">
<Button.Effect>
<DropShadowEffect Color="#FFA000" BlurRadius="15" ShadowDepth="0" Opacity="0.6"/>
</Button.Effect>
</Button>
<!-- 提示文字 -->
<TextBlock Text="点击按钮开始您的洗护之旅"
FontSize="13"
Foreground="#9E9E9E"
HorizontalAlignment="Center"
Margin="0,0,0,10"
FontStyle="Italic"
TextWrapping="Wrap"
TextAlignment="Center"/>
</StackPanel>
</ScrollViewer>
</Grid>
</Border>
</Grid>
<!-- 门打开状态:左右布局 -->
<Grid Visibility="{Binding IsDoorOpen, Converter={StaticResource BoolToVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 左侧:大图展示区 -->
<Border Grid.Column="0"
Background="White"
CornerRadius="30"
Padding="20"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="6" Opacity="0.4"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 顶部装饰条 -->
<Border Grid.Row="0"
Background="#FF6F00"
CornerRadius="15"
Padding="20,12"
Margin="0,0,0,20">
<Border.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="10" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="⚠ 设备门已打开"
FontSize="24"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"/>
</Border>
<!-- 宠物大图轮播 -->
<Border Grid.Row="1"
Background="#F5F5F5"
BorderBrush="#FFB74D"
BorderThickness="4"
ClipToBounds="True">
<Border.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="15" ShadowDepth="0" Opacity="0.4"/>
</Border.Effect>
<Image Source="{Binding CurrentCarouselImage}"
Stretch="UniformToFill"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity"
From="0" To="1"
Duration="0:0:0.5"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Border>
</Grid>
</Border>
<!-- 右侧:操作提示区 -->
<Border Grid.Column="2"
Background="White"
CornerRadius="30"
Padding="30,25"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="6" Opacity="0.4"/>
</Border.Effect>
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
Padding="5,0">
<StackPanel>
<!-- 标题 -->
<TextBlock Text="欢迎使用"
FontSize="24"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
Margin="0,10,0,8"
TextWrapping="Wrap">
<TextBlock.Effect>
<DropShadowEffect Color="#81C784" BlurRadius="8" ShadowDepth="0" Opacity="0.6"/>
</TextBlock.Effect>
</TextBlock>
<TextBlock Text="全自动洗宠机"
FontSize="30"
FontWeight="Bold"
Foreground="#1B5E20"
HorizontalAlignment="Center"
Margin="0,0,0,25"
TextWrapping="Wrap">
<TextBlock.Effect>
<DropShadowEffect Color="#81C784" BlurRadius="10" ShadowDepth="0" Opacity="0.6"/>
</TextBlock.Effect>
</TextBlock>
<!-- 警告提示 -->
<Border Background="#FFF3E0"
CornerRadius="18"
Padding="20,15"
Margin="0,0,0,20">
<Border.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="10" ShadowDepth="0" Opacity="0.3"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="⚠ 设备门已打开"
FontSize="20"
FontWeight="Bold"
HorizontalAlignment="Center"
Foreground="#E65100"
Margin="0,0,0,12"
TextWrapping="Wrap"/>
<TextBlock Text="请按照以下步骤操作:"
FontSize="15"
Foreground="#5D4037"
HorizontalAlignment="Center"
Margin="0,0,0,12"
TextWrapping="Wrap"/>
<Border Background="White"
CornerRadius="10"
Padding="12,8"
Margin="0,0,0,6">
<TextBlock FontSize="14" Foreground="#424242" TextWrapping="Wrap">
<Run Text="1." FontWeight="Bold"/>
<Run Text=" 轻柔地将宠物放入设备"/>
</TextBlock>
</Border>
<Border Background="White"
CornerRadius="10"
Padding="12,8"
Margin="0,0,0,6">
<TextBlock FontSize="14" Foreground="#424242" TextWrapping="Wrap">
<Run Text="2." FontWeight="Bold"/>
<Run Text=" 确保宠物站稳舒适"/>
</TextBlock>
</Border>
<Border Background="White"
CornerRadius="10"
Padding="12,8">
<TextBlock FontSize="14" Foreground="#424242" TextWrapping="Wrap">
<Run Text="3." FontWeight="Bold"/>
<Run Text=" 点击下方按钮关门"/>
</TextBlock>
</Border>
</StackPanel>
</Border>
<!-- 关门按钮 -->
<Button Content="关闭门并开始洗护"
Height="70"
FontSize="22"
FontWeight="Bold"
Background="#4CAF50"
Foreground="White"
BorderThickness="0"
Cursor="Hand"
Command="{Binding CloseDoorCommand}"
Margin="0,0,0,15">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="35">
<Border.Effect>
<DropShadowEffect Color="#4CAF50" BlurRadius="15" ShadowDepth="0" Opacity="0.6"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#66BB6A"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<!-- 提示文字 -->
<TextBlock Text="请确保宠物安全后再关门"
FontSize="13"
Foreground="#9E9E9E"
HorizontalAlignment="Center"
Margin="0,0,0,10"
FontStyle="Italic"
TextWrapping="Wrap"
TextAlignment="Center"/>
</StackPanel>
</ScrollViewer>
</Grid>
</Border>
</Grid>
</Grid>
<!-- 底部导航栏 -->
<Border Grid.Row="2" Padding="30,20">
<UniformGrid Rows="1" Columns="4">
<Button Content="📖 使用说明"
Height="70"
Margin="5"
Style="{StaticResource RoundButton}"
Command="{Binding ShowInstructionCommand}"/>
<Button Content="📦 套餐详情"
Height="70"
Margin="5"
Style="{StaticResource RoundButton}"
Command="{Binding ShowPaymentCommand}"/>
<Button Content="📞 联系客服"
Height="70"
Margin="5"
Style="{StaticResource RoundButton}"
Command="{Binding ShowCustomerServiceCommand}"/>
<Button Content="⚙ 设置"
Height="70"
Margin="5"
Style="{StaticResource RoundButton}"
Command="{Binding ShowSettingsCommand}"/>
</UniformGrid>
</Border>
</Grid>
<!-- 支付界面(套餐选择) -->
<Grid x:Name="PaymentView" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 顶部标题栏 -->
<Border Grid.Row="0" Padding="30,20">
<Grid>
<Button Content="←"
FontSize="36"
Width="60"
Height="60"
Background="#FFD54F"
Foreground="#5D4037"
BorderThickness="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding BackToIdleCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="30">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<TextBlock Text="全自动洗宠机"
FontSize="48"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FFFFFF" BlurRadius="10" ShadowDepth="0" Opacity="0.8"/>
</TextBlock.Effect>
</TextBlock>
</Grid>
</Border>
<!-- 套餐标题 -->
<Border Grid.Row="1"
Background="#FFD54F"
CornerRadius="20"
Padding="25,15"
Margin="40,10,40,20">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="10" ShadowDepth="4" Opacity="0.3"/>
</Border.Effect>
<TextBlock Text="请选择套餐"
FontSize="32"
FontWeight="Bold"
Foreground="#5D4037"
HorizontalAlignment="Center"/>
</Border>
<!-- 套餐列表 -->
<ScrollViewer Grid.Row="2"
VerticalScrollBarVisibility="Auto"
Margin="40,0,40,20">
<ItemsControl ItemsSource="{Binding Packages}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1" Columns="3"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource PackageCard}"
MouseLeftButtonDown="Package_Click">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 套餐名称 -->
<TextBlock Grid.Row="0"
Text="{Binding Name}"
FontSize="28"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"
Margin="0,0,0,15"/>
<!-- 适用犬型和时长 -->
<Border Grid.Row="1"
Background="#BF360C"
CornerRadius="10"
Padding="15,10"
Margin="0,0,0,15">
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="{Binding Description}"
FontSize="18"
Foreground="White"
HorizontalAlignment="Center"
Margin="0,0,0,5"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<TextBlock Text="{Binding DurationMinutes}"
Foreground="White"
FontWeight="Bold"
FontSize="22"/>
<TextBlock Text=" 分钟"
FontSize="18"
Foreground="White"/>
</StackPanel>
</StackPanel>
</Border>
<!-- 价格 -->
<Border Grid.Row="2"
Background="#FF6F00"
CornerRadius="15"
Padding="20,12">
<TextBlock HorizontalAlignment="Center"
Foreground="White">
<Run Text="¥" FontSize="28" FontWeight="Bold"/>
<Run Text="{Binding Price}" FontSize="42" FontWeight="Bold"/>
</TextBlock>
</Border>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<!-- 底部提示 -->
<Border Grid.Row="3" Padding="30,20">
<TextBlock Text="点击套餐卡片进行选择"
FontSize="20"
Foreground="#558B2F"
HorizontalAlignment="Center"
FontWeight="SemiBold"/>
</Border>
</Grid>
<!-- 二维码支付界面 -->
<Grid x:Name="QRCodeView" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 顶部标题栏 -->
<Border Grid.Row="0" Padding="30,20">
<Grid>
<Button Content="←"
FontSize="36"
Width="60"
Height="60"
Background="#FFD54F"
Foreground="#5D4037"
BorderThickness="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding CancelPaymentCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="30">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<TextBlock Text="扫码支付"
FontSize="48"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FFFFFF" BlurRadius="10" ShadowDepth="0" Opacity="0.8"/>
</TextBlock.Effect>
</TextBlock>
</Grid>
</Border>
<!-- 支付内容 -->
<Grid Grid.Row="1" Margin="0,10,0,10">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<!-- 支付信息卡片 -->
<Border Background="White"
CornerRadius="20"
Padding="35,30"
MaxWidth="550">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="15" ShadowDepth="4" Opacity="0.3"/>
</Border.Effect>
<StackPanel>
<!-- 套餐信息 -->
<TextBlock Text="{Binding SelectedPackage.Name}"
FontSize="26"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
Margin="0,0,0,12"/>
<!-- 支付金额 -->
<Border Background="#FFE0B2"
CornerRadius="15"
Padding="25,15"
Margin="0,0,0,20">
<StackPanel>
<TextBlock Text="支付金额"
FontSize="16"
Foreground="#5D4037"
HorizontalAlignment="Center"
Margin="0,0,0,8"/>
<TextBlock HorizontalAlignment="Center">
<Run Text="¥"
Foreground="#FF6F00"
FontSize="28"
FontWeight="Bold"/>
<Run Text="{Binding SelectedPackage.Price}"
Foreground="#FF6F00"
FontSize="44"
FontWeight="Bold"/>
</TextBlock>
</StackPanel>
</Border>
<!-- 二维码 -->
<Border Background="#F5F5F5"
Width="220"
Height="220"
CornerRadius="15"
HorizontalAlignment="Center"
Margin="0,0,0,18"
BorderBrush="#E0E0E0"
BorderThickness="2">
<Image Source="/Images/qrcode.png"
Stretch="Uniform"
Margin="10"/>
</Border>
<!-- 支付提示 -->
<TextBlock Text="请使用微信或支付宝扫描二维码"
FontSize="15"
Foreground="#757575"
HorizontalAlignment="Center"
Margin="0,0,0,20"/>
<!-- 按钮组 -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="15"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0"
Content="模拟支付成功"
Height="50"
FontSize="16"
FontWeight="Bold"
Background="#4CAF50"
Foreground="White"
BorderThickness="0"
Cursor="Hand"
Command="{Binding SimulatePaymentCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="12">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="6" ShadowDepth="2" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<Button Grid.Column="2"
Content="取消支付"
Height="50"
FontSize="16"
FontWeight="Bold"
Background="#9E9E9E"
Foreground="White"
BorderThickness="0"
Cursor="Hand"
Command="{Binding CancelPaymentCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="12">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="6" ShadowDepth="2" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
</Grid>
<!-- 底部状态栏 -->
<Border Grid.Row="2" Padding="30,20">
<TextBlock Text="等待支付中..."
FontSize="20"
Foreground="#558B2F"
HorizontalAlignment="Center"
FontWeight="SemiBold"/>
</Border>
</Grid>
<!-- 洗护进度界面 -->
<Grid x:Name="WashingView" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 顶部标题栏 -->
<Border Grid.Row="0" Padding="30,20">
<Grid>
<TextBlock Text="全自动洗宠机"
FontSize="48"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FFFFFF" BlurRadius="10" ShadowDepth="0" Opacity="0.8"/>
</TextBlock.Effect>
</TextBlock>
<Button Content="⚙"
FontSize="32"
Width="60"
Height="60"
Background="#FFD54F"
Foreground="#5D4037"
BorderThickness="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding ShowSettingsCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="30">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Border>
<!-- 洗护内容 -->
<Grid Grid.Row="1" Margin="40,10,40,30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 左侧:流程步骤 -->
<Border Grid.Column="0"
Background="White"
CornerRadius="25"
Padding="30"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="15" ShadowDepth="5" Opacity="0.4"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 标题 -->
<Border Grid.Row="0"
Background="#FFD54F"
CornerRadius="15"
Padding="20,12"
Margin="0,0,0,25">
<TextBlock Text="洗护流程"
FontSize="28"
FontWeight="Bold"
Foreground="#5D4037"
HorizontalAlignment="Center"/>
</Border>
<!-- 流程步骤网格 -->
<ItemsControl Grid.Row="1" ItemsSource="{Binding WashSteps}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="3" Rows="3"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Margin="8"
CornerRadius="18"
Padding="15,20"
Cursor="Hand">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#EEEEEE" Offset="0"/>
<GradientStop Color="#E0E0E0" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.25"/>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Status}" Value="进行中">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#FFD54F" Offset="0"/>
<GradientStop Color="#FFB74D" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#FF6F00" BlurRadius="15" ShadowDepth="0" Opacity="0.6"/>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="已完成">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#81C784" Offset="0"/>
<GradientStop Color="#66BB6A" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#4CAF50" BlurRadius="12" ShadowDepth="0" Opacity="0.5"/>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 步骤名称 -->
<TextBlock Grid.Row="0"
Text="{Binding Name}"
FontSize="17"
FontWeight="Bold"
TextAlignment="Center"
TextWrapping="Wrap"
Margin="0,0,0,12">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#616161"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Status}" Value="进行中">
<Setter Property="Foreground" Value="White"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="已完成">
<Setter Property="Foreground" Value="White"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<!-- 状态指示器 -->
<Grid Grid.Row="2">
<!-- 等待状态:空心圆 -->
<Ellipse Width="36" Height="36"
Stroke="#9E9E9E"
StrokeThickness="3"
HorizontalAlignment="Center">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Status}" Value="进行中">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="已完成">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<!-- 进行中状态:旋转的圆环 -->
<Grid Width="36" Height="36" HorizontalAlignment="Center">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Status}" Value="进行中">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Ellipse Stroke="White" StrokeThickness="4"
StrokeDashArray="8 4"
RenderTransformOrigin="0.5,0.5">
<Ellipse.RenderTransform>
<RotateTransform x:Name="SpinnerRotate"/>
</Ellipse.RenderTransform>
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="SpinnerRotate"
Storyboard.TargetProperty="Angle"
From="0" To="360"
Duration="0:0:2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</Grid>
<!-- 完成状态:对勾 -->
<Viewbox Width="36" Height="36" HorizontalAlignment="Center">
<Viewbox.Style>
<Style TargetType="Viewbox">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Status}" Value="已完成">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Viewbox.Style>
<Canvas Width="24" Height="24">
<Path Data="M9,16.17L4.83,12l-1.42,1.41L9,19L21,7l-1.41-1.41L9,16.17z"
Fill="White"
Stroke="White"
StrokeThickness="1"/>
</Canvas>
</Viewbox>
</Grid>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Border>
<!-- 右侧:宠物图片和倒计时 -->
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="1.2*"/>
<RowDefinition Height="20"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 宠物图片区域 -->
<Border Grid.Row="0"
Background="White"
CornerRadius="25"
Padding="25"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="15" ShadowDepth="5" Opacity="0.4"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 温度指示器 -->
<Grid Grid.Row="0" Margin="0,0,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 水温 -->
<Border Grid.Column="0"
Background="#FFE0B2"
CornerRadius="20"
Padding="15,10"
Margin="0,0,5,0">
<Border.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="8" ShadowDepth="0" Opacity="0.4"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="水温"
FontSize="13"
Foreground="#E65100"
HorizontalAlignment="Center"
Margin="0,0,0,4"/>
<TextBlock HorizontalAlignment="Center">
<Run Text="🌡" FontSize="18"/>
<Run Text="{Binding WaterTemperature, StringFormat={}{0:F1}}"
FontSize="18"
FontWeight="Bold"
Foreground="#E65100"/>
<Run Text="°C" FontSize="14" Foreground="#E65100"/>
</TextBlock>
</StackPanel>
</Border>
<!-- 室温 -->
<Border Grid.Column="1"
Background="#C8E6C9"
CornerRadius="20"
Padding="15,10"
Margin="5,0,0,0">
<Border.Effect>
<DropShadowEffect Color="#4CAF50" BlurRadius="8" ShadowDepth="0" Opacity="0.4"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="室温"
FontSize="13"
Foreground="#2E7D32"
HorizontalAlignment="Center"
Margin="0,0,0,4"/>
<TextBlock HorizontalAlignment="Center">
<Run Text="🌡" FontSize="18"/>
<Run Text="{Binding RoomTemperature, StringFormat={}{0:F1}}"
FontSize="18"
FontWeight="Bold"
Foreground="#2E7D32"/>
<Run Text="°C" FontSize="14" Foreground="#2E7D32"/>
</TextBlock>
</StackPanel>
</Border>
</Grid>
<!-- 可爱的宠物图片 -->
<Border Grid.Row="1"
Background="#FFE0B2"
CornerRadius="20"
Margin="0,0,0,15">
<Border.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="10" ShadowDepth="0" Opacity="0.3"/>
</Border.Effect>
<Image Source="/Images/dog2.png"
Stretch="UniformToFill"
Margin="0"/>
</Border>
<!-- 当前步骤提示 -->
<Border Grid.Row="2"
Background="#FFD54F"
CornerRadius="15"
Padding="18,12">
<Border.Effect>
<DropShadowEffect Color="#FFA000" BlurRadius="8" ShadowDepth="0" Opacity="0.4"/>
</Border.Effect>
<TextBlock Text="{Binding CurrentStep}"
FontSize="20"
FontWeight="Bold"
Foreground="#5D4037"
TextAlignment="Center"
TextWrapping="Wrap"/>
</Border>
</Grid>
</Border>
<!-- 倒计时区域 -->
<Border Grid.Row="2"
Background="White"
CornerRadius="25"
Padding="25"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="15" ShadowDepth="5" Opacity="0.4"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="剩余时间"
FontSize="18"
Foreground="#757575"
HorizontalAlignment="Center"
Margin="0,0,0,12"/>
<TextBlock Text="{Binding RemainingTime}"
FontSize="56"
FontWeight="Bold"
Foreground="#FF6F00"
FontFamily="Consolas"
HorizontalAlignment="Center"
Margin="0,0,0,20">
<TextBlock.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="10" ShadowDepth="0" Opacity="0.5"/>
</TextBlock.Effect>
</TextBlock>
<!-- 进度条 -->
<Border Background="#E0E0E0"
Height="16"
CornerRadius="8"
Margin="0,0,0,10"
x:Name="ProgressBarContainer">
<Border Background="#FFB74D"
CornerRadius="8"
HorizontalAlignment="Left">
<Border.Width>
<MultiBinding Converter="{StaticResource ProgressToWidthConverter}">
<Binding Path="WashProgress"/>
<Binding ElementName="ProgressBarContainer" Path="ActualWidth"/>
</MultiBinding>
</Border.Width>
<Border.Effect>
<DropShadowEffect Color="#FF6F00" BlurRadius="8" ShadowDepth="0" Opacity="0.6"/>
</Border.Effect>
</Border>
</Border>
<TextBlock HorizontalAlignment="Center"
FontSize="16"
Foreground="#757575"
FontWeight="SemiBold">
<Run Text="{Binding WashProgress}"/>
<Run Text="% 完成"/>
</TextBlock>
<!-- 紧急停止按钮 -->
<Button Content="⚠ 紧急停止"
Height="50"
FontSize="18"
FontWeight="Bold"
Background="#F44336"
Foreground="White"
BorderThickness="0"
Margin="0,20,0,0"
Cursor="Hand"
Command="{Binding EmergencyStopCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="25">
<Border.Effect>
<DropShadowEffect Color="#D32F2F" BlurRadius="10" ShadowDepth="0" Opacity="0.6"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</Border>
</Grid>
</Grid>
</Grid>
<!-- 设置界面 -->
<Grid x:Name="SettingsView" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 顶部标题栏 -->
<Border Grid.Row="0" Padding="30,20">
<Grid>
<Button Content="←"
FontSize="36"
Width="60"
Height="60"
Background="#FFD54F"
Foreground="#5D4037"
BorderThickness="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding BackToIdleCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="30">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<TextBlock Text="系统设置"
FontSize="48"
FontWeight="Bold"
Foreground="#2E7D32"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FFFFFF" BlurRadius="10" ShadowDepth="0" Opacity="0.8"/>
</TextBlock.Effect>
</TextBlock>
</Grid>
</Border>
<!-- 设置内容 -->
<ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto"
Margin="40,10,40,30">
<StackPanel>
<!-- 硬件状态 -->
<Border Background="White"
CornerRadius="20"
Padding="30"
Margin="0,0,0,20"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="12" ShadowDepth="4" Opacity="0.3"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="硬件状态"
FontSize="28"
FontWeight="Bold"
Foreground="#2E7D32"
Margin="0,0,0,20"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 门状态 -->
<Border Grid.Row="0" Grid.Column="0"
Background="#E8F5E9"
CornerRadius="12"
Padding="20,15"
Margin="5">
<StackPanel Orientation="Horizontal">
<Ellipse Width="20" Height="20"
Fill="#4CAF50"
Margin="0,0,15,0">
<Ellipse.Effect>
<DropShadowEffect Color="#4CAF50" BlurRadius="8" ShadowDepth="0" Opacity="0.8"/>
</Ellipse.Effect>
</Ellipse>
<TextBlock Text="门状态:已关闭"
FontSize="18"
Foreground="#2E7D32"
FontWeight="SemiBold"/>
</StackPanel>
</Border>
<!-- 水泵状态 -->
<Border Grid.Row="0" Grid.Column="1"
Background="#E1F5FE"
CornerRadius="12"
Padding="20,15"
Margin="5">
<StackPanel Orientation="Horizontal">
<Ellipse Width="20" Height="20"
Fill="#03A9F4"
Margin="0,0,15,0">
<Ellipse.Effect>
<DropShadowEffect Color="#03A9F4" BlurRadius="8" ShadowDepth="0" Opacity="0.8"/>
</Ellipse.Effect>
</Ellipse>
<TextBlock Text="水泵:正常"
FontSize="18"
Foreground="#0277BD"
FontWeight="SemiBold"/>
</StackPanel>
</Border>
<!-- 加热器状态 -->
<Border Grid.Row="1" Grid.Column="0"
Background="#FFF3E0"
CornerRadius="12"
Padding="20,15"
Margin="5">
<StackPanel Orientation="Horizontal">
<Ellipse Width="20" Height="20"
Fill="#FF9800"
Margin="0,0,15,0">
<Ellipse.Effect>
<DropShadowEffect Color="#FF9800" BlurRadius="8" ShadowDepth="0" Opacity="0.8"/>
</Ellipse.Effect>
</Ellipse>
<TextBlock Text="加热器:正常"
FontSize="18"
Foreground="#E65100"
FontWeight="SemiBold"/>
</StackPanel>
</Border>
<!-- 风机状态 -->
<Border Grid.Row="1" Grid.Column="1"
Background="#F3E5F5"
CornerRadius="12"
Padding="20,15"
Margin="5">
<StackPanel Orientation="Horizontal">
<Ellipse Width="20" Height="20"
Fill="#9C27B0"
Margin="0,0,15,0">
<Ellipse.Effect>
<DropShadowEffect Color="#9C27B0" BlurRadius="8" ShadowDepth="0" Opacity="0.8"/>
</Ellipse.Effect>
</Ellipse>
<TextBlock Text="风机:正常"
FontSize="18"
Foreground="#6A1B9A"
FontWeight="SemiBold"/>
</StackPanel>
</Border>
<!-- 连接状态 -->
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
Background="#E8EAF6"
CornerRadius="12"
Padding="20,15"
Margin="5">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Ellipse Width="20" Height="20"
Fill="#3F51B5"
Margin="0,0,15,0">
<Ellipse.Effect>
<DropShadowEffect Color="#3F51B5" BlurRadius="8" ShadowDepth="0" Opacity="0.8"/>
</Ellipse.Effect>
</Ellipse>
<TextBlock Text="MQTT连接已连接"
FontSize="18"
Foreground="#283593"
FontWeight="SemiBold"/>
</StackPanel>
</Border>
</Grid>
</StackPanel>
</Border>
<!-- 系统参数 -->
<Border Background="White"
CornerRadius="20"
Padding="30"
Opacity="0.95">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="12" ShadowDepth="4" Opacity="0.3"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="系统参数"
FontSize="28"
FontWeight="Bold"
Foreground="#2E7D32"
Margin="0,0,0,20"/>
<!-- 参数列表 - 两列布局 -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="15"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 左列 -->
<StackPanel Grid.Column="0">
<!-- 首次喷水 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="首次喷水"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-"
Command="{Binding DecreaseFirstSprayWaterCommand}"
Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White"
BorderBrush="#FF6F00"
BorderThickness="2"
CornerRadius="8"
Padding="12,6"
MinWidth="60"
Margin="8,0,0,0">
<TextBlock Text="{Binding FirstSprayWaterTime}"
FontSize="18"
FontWeight="Bold"
Foreground="#FF6F00"
TextAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<Button Content="+"
Command="{Binding IncreaseFirstSprayWaterCommand}"
Style="{StaticResource ParamAdjustButton}"
Margin="8,0,0,0"/>
<TextBlock Text="分钟"
FontSize="16"
Foreground="#424242"
Margin="4,0,0,0"
VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 喷沐浴露1 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="喷沐浴露1"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseSprayShampoo1Command}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding SprayShampoo1Time}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseSprayShampoo1Command}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 沐浴1后喷水 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="沐浴1后喷水"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseAfterShampoo1SprayCommand}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding AfterShampoo1SprayTime}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseAfterShampoo1SprayCommand}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 喷沐浴露2 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="喷沐浴露2"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseSprayShampoo2Command}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding SprayShampoo2Time}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseSprayShampoo2Command}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 沐浴2后喷水 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="沐浴2后喷水"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseAfterShampoo2SprayCommand}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding AfterShampoo2SprayTime}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseAfterShampoo2SprayCommand}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
</StackPanel>
<!-- 右列 -->
<StackPanel Grid.Column="2">
<!-- 喷沐浴露3 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="喷沐浴露3"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseSprayShampoo3Command}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding SprayShampoo3Time}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseSprayShampoo3Command}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 沐浴3后喷水 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="沐浴3后喷水"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseAfterShampoo3SprayCommand}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding AfterShampoo3SprayTime}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseAfterShampoo3SprayCommand}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 冷风机时间 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="冷风机时间"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseColdAirCommand}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding ColdAirTime}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseColdAirCommand}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 热风机时间 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="热风机时间"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseHotAirCommand}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding HotAirTime}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseHotAirCommand}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<!-- 紫外线杀菌 -->
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="紫外线杀菌"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="-" Command="{Binding DecreaseUvSterilizationCommand}" Style="{StaticResource ParamAdjustButton}"/>
<Border Background="White" BorderBrush="#FF6F00" BorderThickness="2" CornerRadius="8" Padding="12,6" MinWidth="60" Margin="8,0,0,0">
<TextBlock Text="{Binding UvSterilizationTime}" FontSize="18" FontWeight="Bold" Foreground="#FF6F00" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Button Content="+" Command="{Binding IncreaseUvSterilizationCommand}" Style="{StaticResource ParamAdjustButton}" Margin="8,0,0,0"/>
<TextBlock Text="分钟" FontSize="16" Foreground="#424242" Margin="4,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
</StackPanel>
</Grid>
<!-- 分隔线 -->
<Border Height="2" Background="#E0E0E0" Margin="0,20,0,20"/>
<!-- 固定参数显示 - 两列布局 -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="15"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<TextBlock Text="水温设置"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<TextBlock Text="40°C"
FontSize="18"
FontWeight="Bold"
Foreground="#FF6F00"
HorizontalAlignment="Right"
VerticalAlignment="Center"/>
</Grid>
</Border>
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<TextBlock Text="风温设置"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<TextBlock Text="45°C"
FontSize="18"
FontWeight="Bold"
Foreground="#FF6F00"
HorizontalAlignment="Right"
VerticalAlignment="Center"/>
</Grid>
</Border>
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<TextBlock Text="1号浴露液位"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<TextBlock Text="{Binding Shampoo1Level, StringFormat={}{0}%}"
FontSize="18"
FontWeight="Bold"
Foreground="#4CAF50"
HorizontalAlignment="Right"
VerticalAlignment="Center"/>
</Grid>
</Border>
</StackPanel>
<StackPanel Grid.Column="2">
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<TextBlock Text="2号浴露液位"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<TextBlock Text="{Binding Shampoo2Level, StringFormat={}{0}%}"
FontSize="18"
FontWeight="Bold"
Foreground="#4CAF50"
HorizontalAlignment="Right"
VerticalAlignment="Center"/>
</Grid>
</Border>
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<TextBlock Text="3号浴露液位"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<TextBlock Text="{Binding Shampoo3Level, StringFormat={}{0}%}"
FontSize="18"
FontWeight="Bold"
Foreground="#4CAF50"
HorizontalAlignment="Right"
VerticalAlignment="Center"/>
</Grid>
</Border>
<Border Background="#F5F5F5"
CornerRadius="10"
Padding="15,12"
Margin="0,0,0,10">
<Grid>
<TextBlock Text="系统版本"
FontSize="16"
Foreground="#424242"
VerticalAlignment="Center"/>
<TextBlock Text="v1.0.0"
FontSize="18"
FontWeight="Bold"
Foreground="#3F51B5"
HorizontalAlignment="Right"
VerticalAlignment="Center"/>
</Grid>
</Border>
</StackPanel>
</Grid>
<!-- 保存按钮 -->
<Button Content="保存设置"
FontSize="24"
FontWeight="Bold"
Height="60"
Background="#4CAF50"
Foreground="White"
BorderThickness="0"
Margin="0,20,0,0"
Cursor="Hand"
Command="{Binding SaveSettingsCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="15">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="3" Opacity="0.3"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
</Grid>
</Grid>
<!-- 使用说明弹窗 -->
<Grid Visibility="{Binding IsInstructionDialogOpen, Converter={StaticResource BoolToVisibilityConverter}}"
Background="#80000000">
<Border Background="White"
CornerRadius="20"
MaxWidth="1000"
MaxHeight="700"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="30" ShadowDepth="10" Opacity="0.5"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#4CAF50"
CornerRadius="20,20,0,0"
Padding="30,20">
<Grid>
<TextBlock Text="使用说明"
FontSize="28"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<Button Content="✕"
FontSize="24"
Width="40"
Height="40"
Background="Transparent"
Foreground="White"
BorderThickness="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding CloseInstructionCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="20">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Border>
<!-- 图片内容区 -->
<Border Grid.Row="1"
Padding="20"
Background="White"
MinHeight="400">
<Grid>
<!-- 图片 -->
<Image x:Name="InstructionImage"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderOptions.BitmapScalingMode="HighQuality">
<Image.Source>
<BitmapImage UriSource="/Images/liuc.png"
CacheOption="OnLoad"
CreateOptions="IgnoreColorProfile"/>
</Image.Source>
</Image>
<!-- 加载失败时的提示 -->
<TextBlock Text="使用说明图片"
FontSize="24"
Foreground="#999"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed"/>
</Grid>
</Border>
<!-- 底部按钮 -->
<Border Grid.Row="2"
Padding="30,20"
Background="White"
CornerRadius="0,0,20,20">
<Button Content="关闭"
Height="50"
Width="200"
FontSize="20"
FontWeight="Bold"
Style="{StaticResource RoundButton}"
Command="{Binding CloseInstructionCommand}"/>
</Border>
</Grid>
</Border>
</Grid>
<!-- 清理和杀菌弹窗(不可手动关闭) -->
<Grid Visibility="{Binding IsCleaningDialogOpen, Converter={StaticResource BoolToVisibilityConverter}}"
Background="#CC000000">
<Border Background="White"
CornerRadius="25"
Width="520"
Height="480"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="40" ShadowDepth="15" Opacity="0.6"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#4CAF50"
CornerRadius="25,25,0,0"
Padding="30,20,30,20">
<TextBlock Text="设备清理中"
FontSize="28"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<!-- 内容区 -->
<Border Grid.Row="1"
Padding="35,30,35,30"
Background="White"
CornerRadius="0,0,25,25">
<StackPanel VerticalAlignment="Center">
<!-- 动画图标 -->
<Viewbox Width="70" Height="70" Margin="0,0,0,25">
<Canvas Width="100" Height="100">
<Ellipse Width="100" Height="100"
Stroke="#4CAF50"
StrokeThickness="8"
StrokeDashArray="25 15">
<Ellipse.RenderTransform>
<RotateTransform x:Name="SpinnerRotate" CenterX="50" CenterY="50"/>
</Ellipse.RenderTransform>
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="SpinnerRotate"
Storyboard.TargetProperty="Angle"
From="0" To="360"
Duration="0:0:2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</Canvas>
</Viewbox>
<!-- 清理消息 -->
<TextBlock Text="{Binding CleaningMessage}"
FontSize="22"
FontWeight="SemiBold"
Foreground="#333"
HorizontalAlignment="Center"
TextAlignment="Center"
TextWrapping="Wrap"
MaxWidth="420"
Margin="0,0,0,25"/>
<!-- 进度条 -->
<Border Background="#E0E0E0"
CornerRadius="10"
Height="18"
Margin="0,0,0,12">
<Border Background="#4CAF50"
CornerRadius="10"
HorizontalAlignment="Left">
<Border.Width>
<MultiBinding Converter="{StaticResource ProgressToWidthConverter}">
<Binding Path="CleaningProgress"/>
<Binding RelativeSource="{RelativeSource AncestorType=Border, AncestorLevel=1}" Path="ActualWidth"/>
</MultiBinding>
</Border.Width>
</Border>
</Border>
<!-- 进度百分比 -->
<TextBlock FontSize="20"
FontWeight="Bold"
Foreground="#4CAF50"
HorizontalAlignment="Center"
Margin="0,0,0,25">
<Run Text="{Binding CleaningProgress, Mode=OneWay}"/>
<Run Text=" %"/>
</TextBlock>
<!-- 提示文字 -->
<TextBlock Text="请勿打开设备门"
FontSize="16"
Foreground="#FF5722"
HorizontalAlignment="Center"
FontWeight="SemiBold"/>
</StackPanel>
</Border>
</Grid>
</Border>
</Grid>
<!-- 联系客服弹窗 -->
<Grid Visibility="{Binding IsCustomerServiceDialogOpen, Converter={StaticResource BoolToVisibilityConverter}}"
Background="#80000000">
<Border Background="White"
CornerRadius="20"
MaxWidth="800"
MaxHeight="600"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="30" ShadowDepth="10" Opacity="0.5"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#FF6F00"
CornerRadius="20,20,0,0"
Padding="30,20">
<Grid>
<TextBlock Text="联系客服"
FontSize="28"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<Button Content="✕"
FontSize="24"
Width="40"
Height="40"
Background="Transparent"
Foreground="White"
BorderThickness="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
Command="{Binding CloseCustomerServiceCommand}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="20">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Border>
<!-- 图片内容区 -->
<Border Grid.Row="1"
Padding="20"
Background="White"
MinHeight="400">
<Grid>
<!-- 图片 -->
<Image x:Name="CustomerServiceImage"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderOptions.BitmapScalingMode="HighQuality">
<Image.Source>
<BitmapImage UriSource="/Images/kef.png"
CacheOption="OnLoad"
CreateOptions="IgnoreColorProfile"/>
</Image.Source>
</Image>
<!-- 加载失败时的提示 -->
<TextBlock Text="客服联系方式"
FontSize="24"
Foreground="#999"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed"/>
</Grid>
</Border>
<!-- 底部按钮 -->
<Border Grid.Row="2"
Padding="30,20"
Background="White"
CornerRadius="0,0,20,20">
<Button Content="关闭"
Height="50"
Width="200"
FontSize="20"
FontWeight="Bold"
Style="{StaticResource RoundButton}"
Command="{Binding CloseCustomerServiceCommand}"/>
</Border>
</Grid>
</Border>
</Grid>
</Grid>
</Window>