diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Markup/UInt32Extension.cs b/src/Snap.Hutao/Snap.Hutao/Control/Markup/UInt32Extension.cs new file mode 100644 index 00000000..c5bac190 --- /dev/null +++ b/src/Snap.Hutao/Snap.Hutao/Control/Markup/UInt32Extension.cs @@ -0,0 +1,18 @@ +// Copyright (c) DGP Studio. All rights reserved. +// Licensed under the MIT license. + +using Microsoft.UI.Xaml.Markup; + +namespace Snap.Hutao.Control.Markup; + +[MarkupExtensionReturnType(ReturnType = typeof(uint))] +internal sealed class UInt32Extension : MarkupExtension +{ + public string Value { get; set; } = default!; + + protected override object ProvideValue() + { + _ = uint.TryParse(Value, out uint result); + return result; + } +} \ No newline at end of file diff --git a/src/Snap.Hutao/Snap.Hutao/Core/LifeCycle/Activation.cs b/src/Snap.Hutao/Snap.Hutao/Core/LifeCycle/Activation.cs index c53a38cb..f352e24c 100644 --- a/src/Snap.Hutao/Snap.Hutao/Core/LifeCycle/Activation.cs +++ b/src/Snap.Hutao/Snap.Hutao/Core/LifeCycle/Activation.cs @@ -150,7 +150,7 @@ internal sealed class Activation : IActivation // Increase launch times LocalSetting.Set(SettingKeys.LaunchTimes, LocalSetting.Get(SettingKeys.LaunchTimes, 0) + 1); - if (false && LocalSetting.Get(SettingKeys.Major1Minor7Revision0GuideState, (uint)GuideState.None) < (uint)GuideState.Completed) + if (true && LocalSetting.Get(SettingKeys.Major1Minor7Revision0GuideState, (uint)GuideState.Language) < (uint)GuideState.Completed) { await taskContext.SwitchToMainThreadAsync(); serviceProvider.GetRequiredService(); diff --git a/src/Snap.Hutao/Snap.Hutao/GuideWindow.xaml b/src/Snap.Hutao/Snap.Hutao/GuideWindow.xaml index 4e7739fa..1c1d719c 100644 --- a/src/Snap.Hutao/Snap.Hutao/GuideWindow.xaml +++ b/src/Snap.Hutao/Snap.Hutao/GuideWindow.xaml @@ -4,17 +4,11 @@ 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:mxi="using:Microsoft.Xaml.Interactivity" - xmlns:shcb="using:Snap.Hutao.Control.Behavior" xmlns:shcm="using:Snap.Hutao.Control.Markup" xmlns:shvg="using:Snap.Hutao.View.Guide" mc:Ignorable="d"> - - - - diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs index 0ee076d5..a0360730 100644 --- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs +++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs @@ -2535,6 +2535,87 @@ namespace Snap.Hutao.Resource.Localization { } } + /// + /// 查找类似 我已阅读 的本地化字符串。 + /// + internal static string ViewGuideStepAgreementIHaveReadText { + get { + return ResourceManager.GetString("ViewGuideStepAgreementIHaveReadText", resourceCulture); + } + } + + /// + /// 查找类似 问题报告方式与流程 的本地化字符串。 + /// + internal static string ViewGuideStepAgreementIssueReport { + get { + return ResourceManager.GetString("ViewGuideStepAgreementIssueReport", resourceCulture); + } + } + + /// + /// 查找类似 Snap Hutao 开源许可 的本地化字符串。 + /// + internal static string ViewGuideStepAgreementOpenSourceLicense { + get { + return ResourceManager.GetString("ViewGuideStepAgreementOpenSourceLicense", resourceCulture); + } + } + + /// + /// 查找类似 用户数据与隐私权益 的本地化字符串。 + /// + internal static string ViewGuideStepAgreementPrivacyPolicy { + get { + return ResourceManager.GetString("ViewGuideStepAgreementPrivacyPolicy", resourceCulture); + } + } + + /// + /// 查找类似 用户使用协议与法律声明 的本地化字符串。 + /// + internal static string ViewGuideStepAgreementTermOfService { + get { + return ResourceManager.GetString("ViewGuideStepAgreementTermOfService", resourceCulture); + } + } + + /// + /// 查找类似 文档 的本地化字符串。 + /// + internal static string ViewGuideStepDocument { + get { + return ResourceManager.GetString("ViewGuideStepDocument", resourceCulture); + } + } + + /// + /// 查找类似 环境 的本地化字符串。 + /// + internal static string ViewGuideStepEnvironment { + get { + return ResourceManager.GetString("ViewGuideStepEnvironment", resourceCulture); + } + } + + /// + /// 查找类似 语言 的本地化字符串。 + /// + internal static string ViewGuideStepLanguage { + get { + return ResourceManager.GetString("ViewGuideStepLanguage", resourceCulture); + } + } + + /// + /// 查找类似 资源 的本地化字符串。 + /// + internal static string ViewGuideStepStaticResource { + get { + return ResourceManager.GetString("ViewGuideStepStaticResource", resourceCulture); + } + } + /// /// 查找类似 深渊统计 的本地化字符串。 /// @@ -2985,6 +3066,42 @@ namespace Snap.Hutao.Resource.Localization { } } + /// + /// 查找类似 我已阅读并同意上方的条款 的本地化字符串。 + /// + internal static string ViewModelGuideActionAgreement { + get { + return ResourceManager.GetString("ViewModelGuideActionAgreement", resourceCulture); + } + } + + /// + /// 查找类似 完成 的本地化字符串。 + /// + internal static string ViewModelGuideActionComplete { + get { + return ResourceManager.GetString("ViewModelGuideActionComplete", resourceCulture); + } + } + + /// + /// 查找类似 下一步 的本地化字符串。 + /// + internal static string ViewModelGuideActionNext { + get { + return ResourceManager.GetString("ViewModelGuideActionNext", resourceCulture); + } + } + + /// + /// 查找类似 下载资源文件中,请稍后 的本地化字符串。 + /// + internal static string ViewModelGuideActionStaticResourceBegin { + get { + return ResourceManager.GetString("ViewModelGuideActionStaticResourceBegin", resourceCulture); + } + } + /// /// 查找类似 请输入正确的邮箱 的本地化字符串。 /// diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx index ed7e20f4..6e41fefe 100644 --- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx +++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx @@ -998,6 +998,33 @@ 祈愿记录 + + 我已阅读 + + + 问题报告方式与流程 + + + Snap Hutao 开源许可 + + + 用户数据与隐私权益 + + + 用户使用协议与法律声明 + + + 文档 + + + 环境 + + + 语言 + + + 资源 + 深渊统计 @@ -1148,6 +1175,18 @@ 正在上传到胡桃云服务 + + 我已阅读并同意上方的条款 + + + 完成 + + + 下一步 + + + 下载资源文件中,请稍后 + 请输入正确的邮箱 diff --git a/src/Snap.Hutao/Snap.Hutao/View/Guide/GuideView.xaml b/src/Snap.Hutao/Snap.Hutao/View/Guide/GuideView.xaml index 3d29b4f8..d7dbc423 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Guide/GuideView.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Guide/GuideView.xaml @@ -2,27 +2,130 @@ x:Class="Snap.Hutao.View.Guide.GuideView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:cwc="using:CommunityToolkit.WinUI.Controls" xmlns:cwuc="using:CommunityToolkit.WinUI.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:mxi="using:Microsoft.Xaml.Interactivity" + xmlns:shcb="using:Snap.Hutao.Control.Behavior" + xmlns:shcm="using:Snap.Hutao.Control.Markup" xmlns:shvg="using:Snap.Hutao.ViewModel.Guide" d:DataContext="{d:DesignInstance shvg:GuideViewModel}" mc:Ignorable="d"> + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + +