feat: add 说明书
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
PetWashControl/Images/liuc.png
Normal file
BIN
PetWashControl/Images/liuc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
BIN
PetWashControl/Images/liuc1.png
Normal file
BIN
PetWashControl/Images/liuc1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
@@ -20,6 +20,7 @@
|
||||
<Resource Include="Images\dog.png" />
|
||||
<Resource Include="Images\dog1.png" />
|
||||
<Resource Include="Images\dog2.png" />
|
||||
<Resource Include="Images\liuc.png" />
|
||||
<Resource Include="Images\qrcode.png" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -85,6 +85,9 @@ public partial class MainViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
private string _currentDayOfWeek = DateTime.Now.ToString("dddd", new System.Globalization.CultureInfo("zh-CN"));
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _isInstructionDialogOpen;
|
||||
|
||||
private readonly System.Timers.Timer _carouselTimer;
|
||||
private readonly System.Timers.Timer _clockTimer;
|
||||
private readonly string[] _carouselImages = { "/Images/dog.png", "/Images/dog1.png", "/Images/dog2.png" };
|
||||
@@ -203,6 +206,20 @@ public partial class MainViewModel : ObservableObject
|
||||
_logger.LogInfo($"切换到设置界面,之前的视图: {_previousView}");
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void ShowInstruction()
|
||||
{
|
||||
IsInstructionDialogOpen = true;
|
||||
_logger.LogInfo("显示使用说明");
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void CloseInstruction()
|
||||
{
|
||||
IsInstructionDialogOpen = false;
|
||||
_logger.LogInfo("关闭使用说明");
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void BackToIdle()
|
||||
{
|
||||
|
||||
@@ -551,7 +551,8 @@
|
||||
<Button Content="📖 使用说明"
|
||||
Height="70"
|
||||
Margin="5"
|
||||
Style="{StaticResource RoundButton}"/>
|
||||
Style="{StaticResource RoundButton}"
|
||||
Command="{Binding ShowInstructionCommand}"/>
|
||||
<Button Content="📦 套餐详情"
|
||||
Height="70"
|
||||
Margin="5"
|
||||
@@ -1627,5 +1628,107 @@
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- 使用说明弹窗 -->
|
||||
<Grid Visibility="{Binding IsInstructionDialogOpen, Converter={StaticResource BoolToVisibilityConverter}}"
|
||||
Background="#80000000">
|
||||
<Border Background="White"
|
||||
CornerRadius="20"
|
||||
MaxWidth="1000"
|
||||
MaxHeight="800"
|
||||
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>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user