feat: add 说明书

This commit is contained in:
GukSang.Jin
2026-02-26 16:38:19 +08:00
parent fbafc6edf8
commit 779162d064
8 changed files with 122 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -20,6 +20,7 @@
<Resource Include="Images\dog.png" /> <Resource Include="Images\dog.png" />
<Resource Include="Images\dog1.png" /> <Resource Include="Images\dog1.png" />
<Resource Include="Images\dog2.png" /> <Resource Include="Images\dog2.png" />
<Resource Include="Images\liuc.png" />
<Resource Include="Images\qrcode.png" /> <Resource Include="Images\qrcode.png" />
</ItemGroup> </ItemGroup>

View File

@@ -85,6 +85,9 @@ public partial class MainViewModel : ObservableObject
[ObservableProperty] [ObservableProperty]
private string _currentDayOfWeek = DateTime.Now.ToString("dddd", new System.Globalization.CultureInfo("zh-CN")); 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 _carouselTimer;
private readonly System.Timers.Timer _clockTimer; private readonly System.Timers.Timer _clockTimer;
private readonly string[] _carouselImages = { "/Images/dog.png", "/Images/dog1.png", "/Images/dog2.png" }; 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}"); _logger.LogInfo($"切换到设置界面,之前的视图: {_previousView}");
} }
[RelayCommand]
private void ShowInstruction()
{
IsInstructionDialogOpen = true;
_logger.LogInfo("显示使用说明");
}
[RelayCommand]
private void CloseInstruction()
{
IsInstructionDialogOpen = false;
_logger.LogInfo("关闭使用说明");
}
[RelayCommand] [RelayCommand]
private void BackToIdle() private void BackToIdle()
{ {

View File

@@ -551,7 +551,8 @@
<Button Content="📖 使用说明" <Button Content="📖 使用说明"
Height="70" Height="70"
Margin="5" Margin="5"
Style="{StaticResource RoundButton}"/> Style="{StaticResource RoundButton}"
Command="{Binding ShowInstructionCommand}"/>
<Button Content="📦 套餐详情" <Button Content="📦 套餐详情"
Height="70" Height="70"
Margin="5" Margin="5"
@@ -1627,5 +1628,107 @@
</ScrollViewer> </ScrollViewer>
</Grid> </Grid>
</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> </Grid>
</Window> </Window>