mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
77 Commits
feat/Shell
...
feat/1663
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd0ea971dd | ||
|
|
eeab336f99 | ||
|
|
54e1b095c4 | ||
|
|
5208a2cf55 | ||
|
|
bae9c8a46a | ||
|
|
a8baef99d7 | ||
|
|
2c47e7d1da | ||
|
|
2cee94a529 | ||
|
|
b8b9bb2436 | ||
|
|
5511863d7f | ||
|
|
adf3f7e7b1 | ||
|
|
2232772110 | ||
|
|
cd343843b3 | ||
|
|
f5982f81c0 | ||
|
|
1e38c43727 | ||
|
|
7879f1278b | ||
|
|
f8e9b4a1b3 | ||
|
|
c9ea4b358a | ||
|
|
75287473c5 | ||
|
|
3948b81a48 | ||
|
|
e5c751771c | ||
|
|
f7723d21a3 | ||
|
|
4ce064a71a | ||
|
|
b07c569a9e | ||
|
|
c81c0c33d8 | ||
|
|
2274445303 | ||
|
|
271cac9a02 | ||
|
|
9f8f2870ae | ||
|
|
0cc4897354 | ||
|
|
7aa4696ba5 | ||
|
|
9e3ec32ae6 | ||
|
|
cd91af8ae9 | ||
|
|
8680960931 | ||
|
|
67f6fda900 | ||
|
|
db4b0d3dcb | ||
|
|
ec0abb4b16 | ||
|
|
8cdf2b01f2 | ||
|
|
c1bf3dad52 | ||
|
|
492e867391 | ||
|
|
9cbb36f3e6 | ||
|
|
e15c06a194 | ||
|
|
f71a2a3d40 | ||
|
|
fb89e5f9f0 | ||
|
|
3f97f4207c | ||
|
|
a4ea798ad0 | ||
|
|
80a0daf02d | ||
|
|
c511d27b2f | ||
|
|
c5dcbc9c79 | ||
|
|
91949214ba | ||
|
|
a126a330ff | ||
|
|
055846dfd6 | ||
|
|
b68462b56e | ||
|
|
9d47082f47 | ||
|
|
cd4516d9a7 | ||
|
|
f7e94fe2f2 | ||
|
|
e93802d5a5 | ||
|
|
370f2fe1f7 | ||
|
|
c6f747a89b | ||
|
|
cf431719df | ||
|
|
c36c15f9be | ||
|
|
f80a63f557 | ||
|
|
36376f5af6 | ||
|
|
2c057458a3 | ||
|
|
f0f50e0e30 | ||
|
|
b834daef93 | ||
|
|
ff10543c21 | ||
|
|
a55b25ae53 | ||
|
|
c0fbb823d4 | ||
|
|
4306af94be | ||
|
|
dfc83d4a34 | ||
|
|
c6a47eb7be | ||
|
|
7413a81ff4 | ||
|
|
24d143ea9f | ||
|
|
9f6611cd20 | ||
|
|
8252e43bac | ||
|
|
ce58e35a8f | ||
|
|
a10e9e40a2 |
10
.github/workflows/alpha.yml
vendored
10
.github/workflows/alpha.yml
vendored
@@ -29,7 +29,15 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner:
|
||||
- self-hosted
|
||||
- windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
2
.github/workflows/close_stale.yml
vendored
2
.github/workflows/close_stale.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
any-of-labels: 'needs-more-info,需要更多信息'
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 3 days.'
|
||||
stale-issue-message: 'This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.'
|
||||
days-before-stale: 7
|
||||
days-before-close: 3
|
||||
close-issue-reason: not_planned
|
||||
20
README.md
20
README.md
@@ -17,7 +17,15 @@ You can follow the instructions in the [Quick Start](https://hut.ao/en/quick-sta
|
||||
|
||||
## 本地化翻译 / Localization
|
||||
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao) [].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao) [].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao) [].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao) [].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao) [].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao) [].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
[].data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15670597-565845.json)](https://crowdin.com/project/snap-hutao)
|
||||
|
||||
Snap Hutao 使用 [Crowdin](https://translate.hut.ao/) 作为客户端文本翻译平台,在该平台上你可以为你熟悉的语言提交翻译文本。我们感谢每一个为 Snap Hutao 做出贡献的社区成员,并且欢迎更多的朋友能参与到这个项目中。
|
||||
|
||||
@@ -46,13 +54,13 @@ Snap Hutao uses [Crowdin](https://translate.hut.ao/) as a client text translatio
|
||||
* [CommunityToolkit/dotnet](https://github.com/CommunityToolkit/dotnet)
|
||||
* [CommunityToolkit/Labs-Windows](https://github.com/CommunityToolkit/Labs-Windows)
|
||||
* [CommunityToolkit/Windows](https://github.com/CommunityToolkit/Windows)
|
||||
* [dahall/taskscheduler](https://github.com/dahall/taskscheduler)
|
||||
* [dotnet/efcore](https://github.com/dotnet/efcore)
|
||||
* [dotnet/runtime](https://github.com/dotnet/runtime)
|
||||
* [DotNetAnalyzers/StyleCopAnalyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers)
|
||||
* [microsoft/vs-validation](https://github.com/microsoft/vs-validation)
|
||||
* [microsoft/WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK)
|
||||
* [microsoft/microsoft-ui-xaml](https://github.com/microsoft/microsoft-ui-xaml)
|
||||
* [quartznet/quartznet](https://github.com/quartznet/quartznet)
|
||||
|
||||
### 支撑项目 / Supporter Project
|
||||
|
||||
@@ -64,9 +72,9 @@ Snap Hutao uses [Crowdin](https://translate.hut.ao/) as a client text translatio
|
||||
Snap Hutao is currently using sponsored software from the following service providers.
|
||||
|
||||
| [](https://www.netlify.com/) | [](https://crowdin.com/) | [](https://gitlab.cn/) |
|
||||
|:----------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------:|
|
||||
| [](https://about.signpath.io) | [](https://1password.com/) | [](https://about.signpath.io) |
|
||||
|
||||
|:-:|:-:|:-:|
|
||||
|[](https://about.signpath.io)|[](https://1password.com/)|[](https://www.digitalocean.com)|
|
||||
|[](https://www.jetbrains.com/opensource/)|||
|
||||
|
||||
- Netlify provides document and home page hosting service for Snap Hutao
|
||||
|
||||
@@ -80,6 +88,8 @@ Snap Hutao is currently using sponsored software from the following service prov
|
||||
|
||||
- DigitalOcean provides reliable cloud database for Snap Hutao database backup
|
||||
|
||||
- Jetbrains provides powerful IDE for Snap Hutao infrastructure services coding
|
||||
|
||||
## 开发 / Development
|
||||
|
||||

|
||||
|
||||
10
build.cake
10
build.cake
@@ -11,6 +11,15 @@ var version = "version";
|
||||
var repoDir = "repoDir";
|
||||
var outputPath = "outputPath";
|
||||
|
||||
// Extension
|
||||
|
||||
static ProcessArgumentBuilder AppendIf(this ProcessArgumentBuilder builder, string text, bool condition)
|
||||
{
|
||||
return condition ? builder.Append(text) : builder;
|
||||
}
|
||||
|
||||
// Properties
|
||||
|
||||
string solution
|
||||
{
|
||||
get => System.IO.Path.Combine(repoDir, "src", "Snap.Hutao", "Snap.Hutao.sln");
|
||||
@@ -157,6 +166,7 @@ Task("Build binary package")
|
||||
.Append("/p:AppxPackageSigningEnabled=false")
|
||||
.Append("/p:AppxBundle=Never")
|
||||
.Append("/p:AppxPackageOutput=" + outputPath)
|
||||
.AppendIf("/p:AlphaConstants=IS_ALPHA_BUILD", !AppVeyor.IsRunningOnAppVeyor)
|
||||
};
|
||||
|
||||
DotNetBuild(project, settings);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace Snap.Hutao.Test.BaseClassLibrary;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class UnsafeAccessorTest
|
||||
[UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_TestProperty")]
|
||||
private static extern int InternalGetInterfaceProperty(ITestInterface instance);
|
||||
|
||||
interface ITestInterface
|
||||
internal interface ITestInterface
|
||||
{
|
||||
internal int TestProperty { get; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -46,7 +47,14 @@ public sealed class UnsafeRuntimeBehaviorTest
|
||||
Assert.AreEqual(1212, testStruct.Value4);
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public unsafe void UnsafeUtf8StringReference()
|
||||
{
|
||||
void* ptr = Unsafe.AsPointer(ref MemoryMarshal.GetReference("test"u8));
|
||||
GC.Collect(GC.MaxGeneration);
|
||||
ReadOnlySpan<byte> bytes = MemoryMarshal.CreateReadOnlySpanFromNullTerminated((byte*)ptr);
|
||||
Console.WriteLine(System.Text.Encoding.UTF8.GetString(bytes));
|
||||
}
|
||||
|
||||
private readonly struct TestStruct
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.4.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.4.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -59,7 +59,7 @@ public sealed partial class App : Application
|
||||
|
||||
public new void Exit()
|
||||
{
|
||||
XamlWindowLifetime.ApplicationExiting = true;
|
||||
XamlLifetime.ApplicationExiting = true;
|
||||
base.Exit();
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ public sealed partial class App : Application
|
||||
|
||||
if (serviceProvider.GetRequiredService<PrivateNamedPipeClient>().TryRedirectActivationTo(activatedEventArgs))
|
||||
{
|
||||
logger.LogDebug("Application exiting on RedirectActivationTo");
|
||||
Exit();
|
||||
return;
|
||||
}
|
||||
@@ -80,12 +81,19 @@ public sealed partial class App : Application
|
||||
LogDiagnosticInformation();
|
||||
|
||||
// Manually invoke
|
||||
activation.Activate(HutaoActivationArguments.FromAppActivationArguments(activatedEventArgs));
|
||||
HutaoActivationArguments hutaoArgs = HutaoActivationArguments.FromAppActivationArguments(activatedEventArgs);
|
||||
if (hutaoArgs.Kind is HutaoActivationKind.Toast)
|
||||
{
|
||||
Exit();
|
||||
return;
|
||||
}
|
||||
|
||||
activation.Activate(hutaoArgs);
|
||||
activation.PostInitialization();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(ex);
|
||||
logger.LogError(ex, "Application failed in App.OnLaunched");
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Snap.Hutao.Control.Collection.AdvancedCollectionView;
|
||||
|
||||
internal sealed class VectorChangedEventArgs : IVectorChangedEventArgs
|
||||
{
|
||||
public VectorChangedEventArgs(CollectionChange cc, int index = -1, object item = null!)
|
||||
public VectorChangedEventArgs(CollectionChange cc, int index = -1, object item = default!)
|
||||
{
|
||||
CollectionChange = cc;
|
||||
Index = (uint)index;
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
namespace Snap.Hutao.Control.Collection.Alternating;
|
||||
|
||||
[Obsolete("Use SettingsCard instead")]
|
||||
[DependencyProperty("ItemAlternateBackground", typeof(Microsoft.UI.Xaml.Media.Brush))]
|
||||
internal sealed partial class AlternatingItemsControl : ItemsControl
|
||||
{
|
||||
private readonly VectorChangedEventHandler<object> itemsVectorChangedEventHandler;
|
||||
|
||||
public AlternatingItemsControl()
|
||||
{
|
||||
itemsVectorChangedEventHandler = OnItemsVectorChanged;
|
||||
Items.VectorChanged += itemsVectorChangedEventHandler;
|
||||
}
|
||||
|
||||
private void OnItemsVectorChanged(IObservableVector<object> items, IVectorChangedEventArgs args)
|
||||
{
|
||||
if (args.CollectionChange is CollectionChange.Reset)
|
||||
{
|
||||
int index = (int)args.Index;
|
||||
for (int i = index; i < items.Count; i++)
|
||||
{
|
||||
if (items[i] is IAlternatingItem item)
|
||||
{
|
||||
item.Background = i % 2 is 0 ? default : ItemAlternateBackground;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
namespace Snap.Hutao.Control.Collection.Alternating;
|
||||
|
||||
[Obsolete("Use SettingsCard instead")]
|
||||
internal interface IAlternatingItem
|
||||
{
|
||||
public Microsoft.UI.Xaml.Media.Brush? Background { get; set; }
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
namespace Snap.Hutao.Control;
|
||||
|
||||
@@ -40,6 +41,6 @@ internal abstract class DependencyValueConverter<TFrom, TTo> : DependencyObject,
|
||||
/// <returns>源</returns>
|
||||
public virtual TFrom ConvertBack(TTo to)
|
||||
{
|
||||
throw Must.NeverHappen();
|
||||
throw HutaoException.NotSupported();
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,6 @@ internal static class FrameworkElementExtension
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
ILogger? logger = service.GetRequiredService(typeof(ILogger<>).MakeGenericType([frameworkElement.GetType()])) as ILogger;
|
||||
logger?.LogError(ex, "Failed to initialize DataContext");
|
||||
throw;
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace Snap.Hutao.Control.Helper;
|
||||
|
||||
[SuppressMessage("", "SH001")]
|
||||
[DependencyProperty("SquareLength", typeof(double), 0D, nameof(OnSquareLengthChanged), IsAttached = true, AttachedType = typeof(FrameworkElement))]
|
||||
[DependencyProperty("IsActualThemeBindingEnabled", typeof(bool), false, nameof(OnIsActualThemeBindingEnabled), IsAttached = true, AttachedType = typeof(FrameworkElement))]
|
||||
[DependencyProperty("ActualTheme", typeof(ElementTheme), ElementTheme.Default, IsAttached = true, AttachedType = typeof(FrameworkElement))]
|
||||
public sealed partial class FrameworkElementHelper
|
||||
{
|
||||
private static void OnSquareLengthChanged(DependencyObject dp, DependencyPropertyChangedEventArgs e)
|
||||
@@ -15,4 +17,22 @@ public sealed partial class FrameworkElementHelper
|
||||
element.Width = (double)e.NewValue;
|
||||
element.Height = (double)e.NewValue;
|
||||
}
|
||||
|
||||
private static void OnIsActualThemeBindingEnabled(DependencyObject dp, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
FrameworkElement element = (FrameworkElement)dp;
|
||||
if ((bool)e.NewValue)
|
||||
{
|
||||
element.ActualThemeChanged += OnActualThemeChanged;
|
||||
}
|
||||
else
|
||||
{
|
||||
element.ActualThemeChanged -= OnActualThemeChanged;
|
||||
}
|
||||
|
||||
static void OnActualThemeChanged(FrameworkElement sender, object args)
|
||||
{
|
||||
SetActualTheme(sender, sender.ActualTheme);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using Snap.Hutao.Control.Extension;
|
||||
using Snap.Hutao.Core.Caching;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
@@ -6,9 +6,6 @@ using Microsoft.UI.Composition;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using Snap.Hutao.Win32;
|
||||
using System.IO;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Snap.Hutao.Control.Image.Implementation;
|
||||
|
||||
|
||||
@@ -63,12 +63,12 @@ internal sealed partial class UniformStaggeredLayout : VirtualizingLayout
|
||||
/// <inheritdoc/>
|
||||
protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
|
||||
{
|
||||
if (context.ItemCount == 0)
|
||||
if (context.ItemCount is 0)
|
||||
{
|
||||
return new Size(availableSize.Width, 0);
|
||||
}
|
||||
|
||||
if ((context.RealizationRect.Width == 0) && (context.RealizationRect.Height == 0))
|
||||
if ((context.RealizationRect.Width is 0) && (context.RealizationRect.Height is 0))
|
||||
{
|
||||
return new Size(availableSize.Width, 0.0f);
|
||||
}
|
||||
|
||||
25
src/Snap.Hutao/Snap.Hutao/Control/Layout/WrapItem.cs
Normal file
25
src/Snap.Hutao/Snap.Hutao/Control/Layout/WrapItem.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
// Licensed to the .NET Fou// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Snap.Hutao.Control.Layout;
|
||||
|
||||
internal sealed class WrapItem
|
||||
{
|
||||
public WrapItem(int index)
|
||||
{
|
||||
Index = index;
|
||||
}
|
||||
|
||||
public static Point EmptyPosition { get; } = new(float.NegativeInfinity, float.NegativeInfinity);
|
||||
|
||||
public int Index { get; }
|
||||
|
||||
public Size Size { get; set; } = Size.Empty;
|
||||
|
||||
public Point Position { get; set; } = EmptyPosition;
|
||||
|
||||
public UIElement? Element { get; set; }
|
||||
}
|
||||
220
src/Snap.Hutao/Snap.Hutao/Control/Layout/WrapLayout.cs
Normal file
220
src/Snap.Hutao/Snap.Hutao/Control/Layout/WrapLayout.cs
Normal file
@@ -0,0 +1,220 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System.Collections.Specialized;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Snap.Hutao.Control.Layout;
|
||||
|
||||
[DependencyProperty("HorizontalSpacing", typeof(double), 0D, nameof(LayoutPropertyChanged))]
|
||||
[DependencyProperty("VerticalSpacing", typeof(double), 0D, nameof(LayoutPropertyChanged))]
|
||||
internal sealed partial class WrapLayout : VirtualizingLayout
|
||||
{
|
||||
protected override void InitializeForContextCore(VirtualizingLayoutContext context)
|
||||
{
|
||||
context.LayoutState = new WrapLayoutState(context);
|
||||
}
|
||||
|
||||
protected override void UninitializeForContextCore(VirtualizingLayoutContext context)
|
||||
{
|
||||
context.LayoutState = default;
|
||||
}
|
||||
|
||||
protected override void OnItemsChangedCore(VirtualizingLayoutContext context, object source, NotifyCollectionChangedEventArgs args)
|
||||
{
|
||||
WrapLayoutState state = (WrapLayoutState)context.LayoutState;
|
||||
|
||||
switch (args.Action)
|
||||
{
|
||||
case NotifyCollectionChangedAction.Add:
|
||||
state.RemoveFromIndex(args.NewStartingIndex);
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Move:
|
||||
int minIndex = Math.Min(args.NewStartingIndex, args.OldStartingIndex);
|
||||
state.RemoveFromIndex(minIndex);
|
||||
state.RecycleElementAt(args.OldStartingIndex);
|
||||
state.RecycleElementAt(args.NewStartingIndex);
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Remove:
|
||||
state.RemoveFromIndex(args.OldStartingIndex);
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Replace:
|
||||
state.RemoveFromIndex(args.NewStartingIndex);
|
||||
state.RecycleElementAt(args.NewStartingIndex);
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Reset:
|
||||
state.Clear();
|
||||
break;
|
||||
}
|
||||
|
||||
base.OnItemsChangedCore(context, source, args);
|
||||
}
|
||||
|
||||
protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
|
||||
{
|
||||
if (context.ItemCount is 0)
|
||||
{
|
||||
return new Size(availableSize.Width, 0);
|
||||
}
|
||||
|
||||
if ((context.RealizationRect.Width is 0) && (context.RealizationRect.Height is 0))
|
||||
{
|
||||
return new Size(availableSize.Width, 0.0f);
|
||||
}
|
||||
|
||||
Size spacing = new(HorizontalSpacing, VerticalSpacing);
|
||||
|
||||
WrapLayoutState state = (WrapLayoutState)context.LayoutState;
|
||||
|
||||
if (spacing != state.Spacing || state.AvailableWidth != availableSize.Width)
|
||||
{
|
||||
state.ClearPositions();
|
||||
state.Spacing = spacing;
|
||||
state.AvailableWidth = availableSize.Width;
|
||||
}
|
||||
|
||||
double currentHeight = 0;
|
||||
Point itemPosition = default;
|
||||
for (int i = 0; i < context.ItemCount; ++i)
|
||||
{
|
||||
bool itemMeasured = false;
|
||||
WrapItem item = state.GetItemAt(i);
|
||||
if (item.Size == Size.Empty)
|
||||
{
|
||||
item.Element = context.GetOrCreateElementAt(i);
|
||||
item.Element.Measure(availableSize);
|
||||
item.Size = item.Element.DesiredSize;
|
||||
itemMeasured = true;
|
||||
}
|
||||
|
||||
Size itemSize = item.Size;
|
||||
|
||||
if (item.Position == WrapItem.EmptyPosition)
|
||||
{
|
||||
if (availableSize.Width < itemPosition.X + itemSize.Width)
|
||||
{
|
||||
// New Row
|
||||
itemPosition.X = 0;
|
||||
itemPosition.Y += currentHeight + spacing.Height;
|
||||
currentHeight = 0;
|
||||
}
|
||||
|
||||
item.Position = itemPosition;
|
||||
}
|
||||
|
||||
itemPosition = item.Position;
|
||||
|
||||
double bottom = itemPosition.Y + itemSize.Height;
|
||||
if (bottom < context.RealizationRect.Top)
|
||||
{
|
||||
// Item is "above" the bounds
|
||||
if (item.Element is not null)
|
||||
{
|
||||
context.RecycleElement(item.Element);
|
||||
item.Element = default;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
else if (itemPosition.Y > context.RealizationRect.Bottom)
|
||||
{
|
||||
// Item is "below" the bounds.
|
||||
if (item.Element is not null)
|
||||
{
|
||||
context.RecycleElement(item.Element);
|
||||
item.Element = default;
|
||||
}
|
||||
|
||||
// We don't need to measure anything below the bounds
|
||||
break;
|
||||
}
|
||||
else if (!itemMeasured)
|
||||
{
|
||||
// Always measure elements that are within the bounds
|
||||
item.Element = context.GetOrCreateElementAt(i);
|
||||
item.Element.Measure(availableSize);
|
||||
|
||||
itemSize = item.Element.DesiredSize;
|
||||
if (itemSize != item.Size)
|
||||
{
|
||||
// this item changed size; we need to recalculate layout for everything after this
|
||||
state.RemoveFromIndex(i + 1);
|
||||
item.Size = itemSize;
|
||||
|
||||
// did the change make it go into the new row?
|
||||
if (availableSize.Width < itemPosition.X + itemSize.Width)
|
||||
{
|
||||
// New Row
|
||||
itemPosition.X = 0;
|
||||
itemPosition.Y += currentHeight + spacing.Height;
|
||||
currentHeight = 0;
|
||||
}
|
||||
|
||||
item.Position = itemPosition;
|
||||
}
|
||||
}
|
||||
|
||||
itemPosition.X += itemSize.Width + spacing.Width;
|
||||
currentHeight = Math.Max(itemSize.Height, currentHeight);
|
||||
}
|
||||
|
||||
return new Size(double.IsInfinity(availableSize.Width) ? 0 : Math.Ceiling(availableSize.Width), state.GetHeight());
|
||||
}
|
||||
|
||||
protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
|
||||
{
|
||||
if (context.ItemCount > 0)
|
||||
{
|
||||
WrapLayoutState state = (WrapLayoutState)context.LayoutState;
|
||||
|
||||
for (int i = 0; i < context.ItemCount; ++i)
|
||||
{
|
||||
if (!ArrangeItem(context, state.GetItemAt(i)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return finalSize;
|
||||
|
||||
static bool ArrangeItem(VirtualizingLayoutContext context, WrapItem item)
|
||||
{
|
||||
if (item.Size == Size.Empty || item.Position == WrapItem.EmptyPosition)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Size size = item.Size;
|
||||
Point position = item.Position;
|
||||
|
||||
if (context.RealizationRect.Top <= position.Y + size.Height && position.Y <= context.RealizationRect.Bottom)
|
||||
{
|
||||
// place the item
|
||||
UIElement child = context.GetOrCreateElementAt(item.Index);
|
||||
child.Arrange(new Rect(position, size));
|
||||
}
|
||||
else if (position.Y > context.RealizationRect.Bottom)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static void LayoutPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (d is WrapLayout layout)
|
||||
{
|
||||
layout.InvalidateMeasure();
|
||||
layout.InvalidateArrange();
|
||||
}
|
||||
}
|
||||
}
|
||||
109
src/Snap.Hutao/Snap.Hutao/Control/Layout/WrapLayoutState.cs
Normal file
109
src/Snap.Hutao/Snap.Hutao/Control/Layout/WrapLayoutState.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System.Runtime.InteropServices;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Snap.Hutao.Control.Layout;
|
||||
|
||||
internal sealed class WrapLayoutState
|
||||
{
|
||||
private readonly List<WrapItem> items = [];
|
||||
private readonly VirtualizingLayoutContext context;
|
||||
|
||||
public WrapLayoutState(VirtualizingLayoutContext context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public Orientation Orientation { get; private set; }
|
||||
|
||||
public Size Spacing { get; set; }
|
||||
|
||||
public double AvailableWidth { get; set; }
|
||||
|
||||
public WrapItem GetItemAt(int index)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(index);
|
||||
|
||||
if (index <= (items.Count - 1))
|
||||
{
|
||||
return items[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
WrapItem item = new(index);
|
||||
items.Add(item);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
RecycleElementAt(i);
|
||||
}
|
||||
|
||||
items.Clear();
|
||||
}
|
||||
|
||||
public void RemoveFromIndex(int index)
|
||||
{
|
||||
if (index >= items.Count)
|
||||
{
|
||||
// Item was added/removed but we haven't realized that far yet
|
||||
return;
|
||||
}
|
||||
|
||||
int numToRemove = items.Count - index;
|
||||
items.RemoveRange(index, numToRemove);
|
||||
}
|
||||
|
||||
public void ClearPositions()
|
||||
{
|
||||
foreach (ref readonly WrapItem item in CollectionsMarshal.AsSpan(items))
|
||||
{
|
||||
item.Position = WrapItem.EmptyPosition;
|
||||
}
|
||||
}
|
||||
|
||||
public double GetHeight()
|
||||
{
|
||||
if (items.Count is 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Point? lastPosition = default;
|
||||
double maxHeight = 0;
|
||||
|
||||
Span<WrapItem> itemSpan = CollectionsMarshal.AsSpan(items);
|
||||
for (int i = items.Count - 1; i >= 0; --i)
|
||||
{
|
||||
ref readonly WrapItem item = ref itemSpan[i];
|
||||
|
||||
if (item.Position == WrapItem.EmptyPosition || item.Size == Size.Empty)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lastPosition is not null && lastPosition.Value.Y > item.Position.Y)
|
||||
{
|
||||
// This is a row above the last item.
|
||||
break;
|
||||
}
|
||||
|
||||
lastPosition = item.Position;
|
||||
maxHeight = Math.Max(maxHeight, item.Size.Height);
|
||||
}
|
||||
|
||||
return lastPosition?.Y + maxHeight ?? 0;
|
||||
}
|
||||
|
||||
public void RecycleElementAt(int index)
|
||||
{
|
||||
context.RecycleElement(context.GetOrCreateElementAt(index));
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Markup;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using Snap.Hutao.Service.Navigation;
|
||||
using Snap.Hutao.View.Helper;
|
||||
using Snap.Hutao.ViewModel.Abstraction;
|
||||
|
||||
namespace Snap.Hutao.Control;
|
||||
@@ -36,6 +38,11 @@ internal class ScopedPage : Page
|
||||
extra.NotifyNavigationCompleted();
|
||||
}
|
||||
|
||||
public virtual void UnloadObjectOverride(DependencyObject unloadableObject)
|
||||
{
|
||||
XamlMarkupHelper.UnloadObject(unloadableObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化
|
||||
/// 应当在 InitializeComponent() 前调用
|
||||
@@ -48,6 +55,7 @@ internal class ScopedPage : Page
|
||||
{
|
||||
IViewModel viewModel = pageScope.ServiceProvider.GetRequiredService<TViewModel>();
|
||||
viewModel.CancellationToken = viewCancellationTokenSource.Token;
|
||||
viewModel.DeferContentLoader = new DeferContentLoader(this);
|
||||
DataContext = viewModel;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
namespace Snap.Hutao.Control.Text.Syntax.MiHoYo;
|
||||
|
||||
internal sealed class MiHoYoColorTextSyntax : MiHoYoXmlElementSyntax
|
||||
@@ -27,7 +29,7 @@ internal sealed class MiHoYoColorTextSyntax : MiHoYoXmlElementSyntax
|
||||
{
|
||||
MiHoYoColorKind.Rgba => new(Position.Start + 17, Position.End - 8),
|
||||
MiHoYoColorKind.Rgb => new(Position.Start + 15, Position.End - 8),
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -40,7 +42,7 @@ internal sealed class MiHoYoColorTextSyntax : MiHoYoXmlElementSyntax
|
||||
{
|
||||
MiHoYoColorKind.Rgba => new(Position.Start + 8, Position.Start + 16),
|
||||
MiHoYoColorKind.Rgb => new(Position.Start + 8, Position.Start + 14),
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
namespace Snap.Hutao.Control.Text.Syntax.MiHoYo;
|
||||
|
||||
// TODO: Pooling syntax nodes to reduce memory allocation
|
||||
internal sealed class MiHoYoSyntaxTree
|
||||
{
|
||||
public MiHoYoSyntaxNode Root { get; set; } = default!;
|
||||
@@ -75,7 +78,7 @@ internal sealed class MiHoYoSyntaxTree
|
||||
{
|
||||
17 => MiHoYoColorKind.Rgba,
|
||||
15 => MiHoYoColorKind.Rgb,
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
|
||||
TextPosition position = new(0, endOfXmlColorRightClosingAtUnprocessedContent);
|
||||
|
||||
@@ -52,6 +52,12 @@
|
||||
<Thickness x:Key="InfoBarIconMargin">19,16,19,16</Thickness>
|
||||
<Thickness x:Key="InfoBarContentRootPadding">0,0,0,0</Thickness>
|
||||
<x:Double x:Key="InfoBarIconFontSize">20</x:Double>
|
||||
|
||||
<Thickness x:Key="InfoBarTitleHorizontalOrientationMargin">0,0,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarMessageHorizontalOrientationMargin">12,0,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarTitleVerticalOrientationMargin">0,16,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarMessageVerticalOrientationMargin">0,6,0,0</Thickness>
|
||||
|
||||
<!-- TODO: When will DefaultInfoBarStyle added -->
|
||||
<Style TargetType="InfoBar">
|
||||
<Setter Property="shch:InfoBarHelper.IsTextSelectionEnabled" Value="False"/>
|
||||
@@ -128,6 +134,7 @@
|
||||
<InfoBarPanel
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource InfoBarPanelMargin}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalOrientationPadding="{StaticResource InfoBarPanelHorizontalOrientationPadding}"
|
||||
VerticalOrientationPadding="{StaticResource InfoBarPanelVerticalOrientationPadding}">
|
||||
<TextBlock
|
||||
@@ -173,6 +180,7 @@
|
||||
<Button
|
||||
Name="CloseButton"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Top"
|
||||
Command="{TemplateBinding CloseButtonCommand}"
|
||||
CommandParameter="{TemplateBinding CloseButtonCommandParameter}"
|
||||
Style="{TemplateBinding CloseButtonStyle}">
|
||||
@@ -236,7 +244,14 @@
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="SeverityLevels">
|
||||
<VisualState x:Name="Informational"/>
|
||||
<VisualState x:Name="Informational">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"/>
|
||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarInformationalSeverityIconBackground}"/>
|
||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarInformationalIconGlyph}"/>
|
||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarInformationalSeverityIconForeground}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Error">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarErrorSeverityBackgroundBrush}"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<TransitionCollection x:Key="ContentThemeTransitions">
|
||||
<ContentThemeTransition/>
|
||||
</TransitionCollection>
|
||||
@@ -20,4 +20,4 @@
|
||||
<TransitionCollection x:Key="NavigationThemeTransitions">
|
||||
<NavigationThemeTransition/>
|
||||
</TransitionCollection>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
namespace Snap.Hutao.Control;
|
||||
|
||||
@@ -39,6 +40,6 @@ internal abstract class ValueConverter<TFrom, TTo> : IValueConverter
|
||||
/// <returns>源</returns>
|
||||
public virtual TFrom ConvertBack(TTo to)
|
||||
{
|
||||
throw Must.NeverHappen();
|
||||
throw HutaoException.NotSupported();
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,9 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Quartz;
|
||||
using Snap.Hutao.Core.Logging;
|
||||
using Snap.Hutao.Service;
|
||||
using Snap.Hutao.Service.DailyNote;
|
||||
using Snap.Hutao.Service.Job;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Windows.Globalization;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
namespace Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库损坏异常
|
||||
/// </summary>
|
||||
[HighQuality]
|
||||
[Obsolete("Use HutaoException instead")]
|
||||
internal sealed class DatabaseCorruptedException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造一个新的用户数据损坏异常
|
||||
/// </summary>
|
||||
/// <param name="message">消息</param>
|
||||
/// <param name="innerException">内部错误</param>
|
||||
public DatabaseCorruptedException(string message, Exception? innerException)
|
||||
: base(SH.FormatCoreExceptionServiceDatabaseCorruptedMessage($"{message}\n{innerException?.Message}"), innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
internal sealed class HutaoException : Exception
|
||||
@@ -11,11 +13,13 @@ internal sealed class HutaoException : Exception
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static HutaoException Throw(string message, Exception? innerException = default)
|
||||
{
|
||||
throw new HutaoException(message, innerException);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void ThrowIf([DoesNotReturnIf(true)] bool condition, string message, Exception? innerException = default)
|
||||
{
|
||||
if (condition)
|
||||
@@ -24,6 +28,7 @@ internal sealed class HutaoException : Exception
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void ThrowIfNot([DoesNotReturnIf(false)] bool condition, string message, Exception? innerException = default)
|
||||
{
|
||||
if (!condition)
|
||||
@@ -33,18 +38,28 @@ internal sealed class HutaoException : Exception
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static ArgumentException Argument(string message, string? paramName)
|
||||
{
|
||||
throw new ArgumentException(message, paramName);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static HutaoException GachaStatisticsInvalidItemId(uint id, Exception? innerException = default)
|
||||
{
|
||||
throw new HutaoException(SH.FormatServiceGachaStatisticsFactoryItemIdInvalid(id), innerException);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static HutaoException UserdataCorrupted(string message, Exception? innerException = default)
|
||||
{
|
||||
throw new HutaoException(message, innerException);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static InvalidCastException InvalidCast<TFrom, TTo>(string name, Exception? innerException = default)
|
||||
{
|
||||
string message = $"This instance of '{typeof(TFrom).FullName}' '{name}' doesn't implement '{typeof(TTo).FullName}'";
|
||||
@@ -52,18 +67,21 @@ internal sealed class HutaoException : Exception
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static InvalidOperationException InvalidOperation(string message, Exception? innerException = default)
|
||||
{
|
||||
throw new InvalidOperationException(message, innerException);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static NotSupportedException NotSupported(string? message = default, Exception? innerException = default)
|
||||
{
|
||||
throw new NotSupportedException(message, innerException);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static OperationCanceledException OperationCanceled(string message, Exception? innerException = default)
|
||||
{
|
||||
throw new OperationCanceledException(message, innerException);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
namespace Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
/// <summary>
|
||||
/// 运行环境异常
|
||||
/// 用户的计算机中的某些设置不符合要求
|
||||
/// </summary>
|
||||
[HighQuality]
|
||||
[Obsolete("Use HutaoException instead")]
|
||||
internal sealed class RuntimeEnvironmentException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造一个新的运行环境异常
|
||||
/// </summary>
|
||||
/// <param name="message">消息</param>
|
||||
/// <param name="innerException">内部错误</param>
|
||||
public RuntimeEnvironmentException(string message, Exception? innerException)
|
||||
: base($"{message}\n{innerException?.Message}", innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Service.Game;
|
||||
using Snap.Hutao.Service.Game.Package;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Core.ExceptionService;
|
||||
@@ -22,92 +19,4 @@ internal static class ThrowHelper
|
||||
{
|
||||
throw new ArgumentException(message, paramName);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static DatabaseCorruptedException DatabaseCorrupted(string message, Exception? inner)
|
||||
{
|
||||
throw new DatabaseCorruptedException(message, inner);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static GameFileOperationException GameFileOperation(string message, Exception? inner)
|
||||
{
|
||||
throw new GameFileOperationException(message, inner);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static InvalidDataException InvalidData(string message, Exception? inner = default)
|
||||
{
|
||||
throw new InvalidDataException(message, inner);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void InvalidDataIf([DoesNotReturnIf(true)] bool condition, string message, Exception? inner = default)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
throw new InvalidDataException(message, inner);
|
||||
}
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static InvalidOperationException InvalidOperation(string message, Exception? inner = default)
|
||||
{
|
||||
throw new InvalidOperationException(message, inner);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static NotSupportedException NotSupported()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static NotSupportedException NotSupported(string message)
|
||||
{
|
||||
throw new NotSupportedException(message);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void NotSupportedIf(bool condition, string message)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
throw new NotSupportedException(message);
|
||||
}
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static OperationCanceledException OperationCanceled(string message, Exception? inner = default)
|
||||
{
|
||||
throw new OperationCanceledException(message, inner);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static PackageConvertException PackageConvert(string message, Exception? inner = default)
|
||||
{
|
||||
throw new PackageConvertException(message, inner);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static RuntimeEnvironmentException RuntimeEnvironment(string message, Exception? inner)
|
||||
{
|
||||
throw new RuntimeEnvironmentException(message, inner);
|
||||
}
|
||||
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static UserdataCorruptedException UserdataCorrupted(string message, Exception? inner)
|
||||
{
|
||||
throw new UserdataCorruptedException(message, inner);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
namespace Snap.Hutao.Core.ExceptionService;
|
||||
|
||||
/// <summary>
|
||||
/// 用户数据损坏异常
|
||||
/// </summary>
|
||||
[HighQuality]
|
||||
[Obsolete("Use HutaoException instead")]
|
||||
internal sealed class UserdataCorruptedException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造一个新的用户数据损坏异常
|
||||
/// </summary>
|
||||
/// <param name="message">消息</param>
|
||||
/// <param name="innerException">内部错误</param>
|
||||
public UserdataCorruptedException(string message, Exception? innerException)
|
||||
: base(SH.FormatCoreExceptionServiceUserdataCorruptedMessage($"{message}\n{innerException?.Message}"), innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ internal sealed class HttpShardCopyWorker<TStatus> : IDisposable
|
||||
using (HttpResponseMessage response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token).ConfigureAwait(false))
|
||||
{
|
||||
response.EnsureSuccessStatusCode();
|
||||
using (IMemoryOwner<byte> memoryOwner = MemoryPool<byte>.Shared.Rent())
|
||||
using (IMemoryOwner<byte> memoryOwner = MemoryPool<byte>.Shared.Rent(bufferSize))
|
||||
{
|
||||
Memory<byte> buffer = memoryOwner.Memory;
|
||||
using (Stream stream = await response.Content.ReadAsStreamAsync(token).ConfigureAwait(false))
|
||||
|
||||
@@ -27,6 +27,7 @@ internal sealed class StreamReaderWriter : IDisposable
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="StreamWriter.WriteAsync(string?)"/>
|
||||
[SuppressMessage("", "SH003")]
|
||||
public Task WriteAsync(string value)
|
||||
{
|
||||
return writer.WriteAsync(value);
|
||||
|
||||
@@ -22,7 +22,7 @@ internal sealed class SeparatorCommaInt32EnumerableConverter : JsonConverter<IEn
|
||||
return EnumerateNumbers(source);
|
||||
}
|
||||
|
||||
return Enumerable.Empty<int>();
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -44,18 +44,12 @@ internal sealed partial class AppActivation : IAppActivation, IAppActivationActi
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
private readonly ICurrentXamlWindowReference currentWindowReference;
|
||||
private readonly ITaskContext taskContext;
|
||||
|
||||
private readonly SemaphoreSlim activateSemaphore = new(1);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Activate(HutaoActivationArguments args)
|
||||
{
|
||||
// Before activate, we try to redirect to the opened process in App,
|
||||
// And we check if it's a toast activation.
|
||||
if (ToastNotificationManagerCompat.WasCurrentProcessToastActivated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
HandleActivationAsync(args).SafeForget();
|
||||
}
|
||||
|
||||
@@ -65,16 +59,28 @@ internal sealed partial class AppActivation : IAppActivation, IAppActivationActi
|
||||
serviceProvider.GetRequiredService<PrivateNamedPipeServer>().RunAsync().SafeForget();
|
||||
ToastNotificationManagerCompat.OnActivated += NotificationActivate;
|
||||
|
||||
serviceProvider.GetRequiredService<HotKeyOptions>().RegisterAll();
|
||||
if (serviceProvider.GetRequiredService<AppOptions>().IsNotifyIconEnabled)
|
||||
using (activateSemaphore.Enter())
|
||||
{
|
||||
XamlWindowLifetime.ApplicationLaunchedWithNotifyIcon = true;
|
||||
serviceProvider.GetRequiredService<App>().DispatcherShutdownMode = DispatcherShutdownMode.OnExplicitShutdown;
|
||||
_ = serviceProvider.GetRequiredService<NotifyIconController>();
|
||||
}
|
||||
// TODO: Introduced in 1.10.2, remove in later version
|
||||
serviceProvider.GetRequiredService<IJumpListInterop>().ClearAsync().SafeForget();
|
||||
serviceProvider.GetRequiredService<IScheduleTaskInterop>().UnregisterAllTasks();
|
||||
|
||||
serviceProvider.GetRequiredService<IScheduleTaskInterop>().UnregisterAllTasks();
|
||||
serviceProvider.GetRequiredService<IQuartzService>().StartAsync(default).SafeForget();
|
||||
if (UnsafeLocalSetting.Get(SettingKeys.Major1Minor10Revision0GuideState, GuideState.Language) < GuideState.Completed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
serviceProvider.GetRequiredService<HotKeyOptions>().RegisterAll();
|
||||
|
||||
if (serviceProvider.GetRequiredService<AppOptions>().IsNotifyIconEnabled)
|
||||
{
|
||||
XamlLifetime.ApplicationLaunchedWithNotifyIcon = true;
|
||||
serviceProvider.GetRequiredService<App>().DispatcherShutdownMode = DispatcherShutdownMode.OnExplicitShutdown;
|
||||
_ = serviceProvider.GetRequiredService<NotifyIconController>();
|
||||
}
|
||||
|
||||
serviceProvider.GetRequiredService<IQuartzService>().StartAsync(default).SafeForget();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -151,49 +157,61 @@ internal sealed partial class AppActivation : IAppActivation, IAppActivationActi
|
||||
{
|
||||
default:
|
||||
{
|
||||
await HandleNormalLaunchActionAsync().ConfigureAwait(false);
|
||||
await HandleNormalLaunchActionAsync(args.IsRedirectTo).ConfigureAwait(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async ValueTask HandleNormalLaunchActionAsync()
|
||||
private async ValueTask HandleNormalLaunchActionAsync(bool isRedirectTo)
|
||||
{
|
||||
// Increase launch times
|
||||
LocalSetting.Update(SettingKeys.LaunchTimes, 0, x => unchecked(x + 1));
|
||||
|
||||
// If the guide is completed, we check if there's any unfulfilled resource category present.
|
||||
if (UnsafeLocalSetting.Get(SettingKeys.Major1Minor10Revision0GuideState, GuideState.Language) >= GuideState.StaticResourceBegin)
|
||||
if (!isRedirectTo)
|
||||
{
|
||||
if (StaticResource.IsAnyUnfulfilledCategoryPresent())
|
||||
// Increase launch times
|
||||
LocalSetting.Update(SettingKeys.LaunchTimes, 0, x => unchecked(x + 1));
|
||||
|
||||
// If the guide is completed, we check if there's any unfulfilled resource category present.
|
||||
if (UnsafeLocalSetting.Get(SettingKeys.Major1Minor10Revision0GuideState, GuideState.Language) >= GuideState.StaticResourceBegin)
|
||||
{
|
||||
UnsafeLocalSetting.Set(SettingKeys.Major1Minor10Revision0GuideState, GuideState.StaticResourceBegin);
|
||||
if (StaticResource.IsAnyUnfulfilledCategoryPresent())
|
||||
{
|
||||
UnsafeLocalSetting.Set(SettingKeys.Major1Minor10Revision0GuideState, GuideState.StaticResourceBegin);
|
||||
}
|
||||
}
|
||||
|
||||
if (UnsafeLocalSetting.Get(SettingKeys.Major1Minor10Revision0GuideState, GuideState.Language) < GuideState.Completed)
|
||||
{
|
||||
await taskContext.SwitchToMainThreadAsync();
|
||||
|
||||
GuideWindow guideWindow = serviceProvider.GetRequiredService<GuideWindow>();
|
||||
currentWindowReference.Window = guideWindow;
|
||||
|
||||
guideWindow.SwitchTo();
|
||||
guideWindow.BringToForeground();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If it's the first time launch, show the guide window anyway.
|
||||
if (UnsafeLocalSetting.Get(SettingKeys.Major1Minor10Revision0GuideState, GuideState.Language) < GuideState.Completed)
|
||||
{
|
||||
await taskContext.SwitchToMainThreadAsync();
|
||||
currentWindowReference.Window = serviceProvider.GetRequiredService<GuideWindow>();
|
||||
}
|
||||
else
|
||||
{
|
||||
await WaitMainWindowAsync().ConfigureAwait(false);
|
||||
}
|
||||
await WaitMainWindowOrCurrentAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async ValueTask WaitMainWindowAsync()
|
||||
private async ValueTask WaitMainWindowOrCurrentAsync()
|
||||
{
|
||||
if (currentWindowReference.Window is not null)
|
||||
if (currentWindowReference.Window is { } window)
|
||||
{
|
||||
window.SwitchTo();
|
||||
window.BringToForeground();
|
||||
return;
|
||||
}
|
||||
|
||||
await taskContext.SwitchToMainThreadAsync();
|
||||
|
||||
currentWindowReference.Window = serviceProvider.GetRequiredService<MainWindow>();
|
||||
MainWindow mainWindow = serviceProvider.GetRequiredService<MainWindow>();
|
||||
currentWindowReference.Window = mainWindow;
|
||||
|
||||
mainWindow.SwitchTo();
|
||||
mainWindow.BringToForeground();
|
||||
|
||||
await taskContext.SwitchToBackgroundAsync();
|
||||
|
||||
@@ -222,7 +240,7 @@ internal sealed partial class AppActivation : IAppActivation, IAppActivationActi
|
||||
{
|
||||
case CategoryAchievement:
|
||||
{
|
||||
await WaitMainWindowAsync().ConfigureAwait(false);
|
||||
await WaitMainWindowOrCurrentAsync().ConfigureAwait(false);
|
||||
await HandleAchievementActionAsync(action, parameter, isRedirectTo).ConfigureAwait(false);
|
||||
break;
|
||||
}
|
||||
@@ -235,7 +253,7 @@ internal sealed partial class AppActivation : IAppActivation, IAppActivationActi
|
||||
|
||||
default:
|
||||
{
|
||||
await HandleNormalLaunchActionAsync().ConfigureAwait(false);
|
||||
await HandleNormalLaunchActionAsync(isRedirectTo).ConfigureAwait(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Snap.Hutao.Core.Windowing;
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using WinRT.Interop;
|
||||
|
||||
namespace Snap.Hutao.Core.LifeCycle;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Microsoft.Windows.AppLifecycle;
|
||||
|
||||
namespace Snap.Hutao.Core.LifeCycle;
|
||||
@@ -9,6 +10,8 @@ internal sealed class HutaoActivationArguments
|
||||
{
|
||||
public bool IsRedirectTo { get; set; }
|
||||
|
||||
public bool IsToastActivated { get; set; }
|
||||
|
||||
public HutaoActivationKind Kind { get; set; }
|
||||
|
||||
public Uri? ProtocolActivatedUri { get; set; }
|
||||
@@ -30,6 +33,15 @@ internal sealed class HutaoActivationArguments
|
||||
if (args.TryGetLaunchActivatedArguments(out string? arguments))
|
||||
{
|
||||
result.LaunchActivatedArguments = arguments;
|
||||
|
||||
foreach (StringSegment segment in new StringTokenizer(arguments, [' ']))
|
||||
{
|
||||
if (segment.AsSpan().SequenceEqual("-ToastActivated"))
|
||||
{
|
||||
result.Kind = HutaoActivationKind.Toast;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -7,5 +7,6 @@ internal enum HutaoActivationKind
|
||||
{
|
||||
None,
|
||||
Launch,
|
||||
Toast,
|
||||
Protocol,
|
||||
}
|
||||
@@ -6,6 +6,9 @@ namespace Snap.Hutao.Core.LifeCycle.InterProcess;
|
||||
internal enum PipePacketCommand : byte
|
||||
{
|
||||
None = 0,
|
||||
Connect = 1,
|
||||
|
||||
RedirectActivation = 10,
|
||||
|
||||
Exit = 30,
|
||||
}
|
||||
@@ -8,5 +8,5 @@ internal enum PipePacketType : byte
|
||||
None = 0,
|
||||
Request = 1,
|
||||
Response = 2,
|
||||
Termination = 3,
|
||||
SessionTermination = 3,
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
using System.IO.Hashing;
|
||||
using System.IO.Pipes;
|
||||
|
||||
namespace Snap.Hutao.Core.LifeCycle.InterProcess;
|
||||
|
||||
internal static class PipeStreamExtension
|
||||
{
|
||||
public static unsafe byte[] GetValidatedContent(this PipeStream stream, PipePacketHeader* header)
|
||||
{
|
||||
byte[] content = new byte[header->ContentLength];
|
||||
stream.ReadAtLeast(content, header->ContentLength, false);
|
||||
HutaoException.ThrowIf(XxHash64.HashToUInt64(content) != header->Checksum, "PipePacket Content Hash incorrect");
|
||||
return content;
|
||||
}
|
||||
|
||||
public static unsafe void WritePacket(this PipeStream stream, PipePacketHeader* header, byte[] content)
|
||||
{
|
||||
header->ContentLength = content.Length;
|
||||
header->Checksum = XxHash64.HashToUInt64(content);
|
||||
|
||||
stream.Write(new(header, sizeof(PipePacketHeader)));
|
||||
stream.Write(content);
|
||||
}
|
||||
}
|
||||
@@ -2,21 +2,59 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.Windows.AppLifecycle;
|
||||
using System.IO.Hashing;
|
||||
using System.IO.Pipes;
|
||||
|
||||
namespace Snap.Hutao.Core.LifeCycle.InterProcess;
|
||||
|
||||
[Injection(InjectAs.Singleton)]
|
||||
internal sealed class PrivateNamedPipeClient : IDisposable
|
||||
[ConstructorGenerated]
|
||||
internal sealed partial class PrivateNamedPipeClient : IDisposable
|
||||
{
|
||||
private readonly NamedPipeClientStream clientStream = new(".", "Snap.Hutao.PrivateNamedPipe", PipeDirection.InOut, PipeOptions.Asynchronous | PipeOptions.WriteThrough);
|
||||
private readonly RuntimeOptions runtimeOptions;
|
||||
|
||||
public unsafe bool TryRedirectActivationTo(AppActivationArguments args)
|
||||
{
|
||||
if (clientStream.TryConnectOnce())
|
||||
{
|
||||
bool serverElevated = false;
|
||||
{
|
||||
// Connect
|
||||
PipePacketHeader connectPacket = default;
|
||||
connectPacket.Version = 1;
|
||||
connectPacket.Type = PipePacketType.Request;
|
||||
connectPacket.Command = PipePacketCommand.Connect;
|
||||
|
||||
clientStream.Write(new(&connectPacket, sizeof(PipePacketHeader)));
|
||||
}
|
||||
|
||||
{
|
||||
// Get previous instance elevated status
|
||||
Span<byte> headerSpan = stackalloc byte[sizeof(PipePacketHeader)];
|
||||
clientStream.ReadExactly(headerSpan);
|
||||
fixed (byte* pHeader = headerSpan)
|
||||
{
|
||||
PipePacketHeader* header = (PipePacketHeader*)pHeader;
|
||||
ReadOnlySpan<byte> content = clientStream.GetValidatedContent(header);
|
||||
serverElevated = JsonSerializer.Deserialize<bool>(content);
|
||||
}
|
||||
}
|
||||
|
||||
if (!serverElevated && runtimeOptions.IsElevated)
|
||||
{
|
||||
// Kill previous instance to use current elevated instance
|
||||
PipePacketHeader killPacket = default;
|
||||
killPacket.Version = 1;
|
||||
killPacket.Type = PipePacketType.SessionTermination;
|
||||
killPacket.Command = PipePacketCommand.Exit;
|
||||
|
||||
clientStream.Write(new(&killPacket, sizeof(PipePacketHeader)));
|
||||
clientStream.Flush();
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
// Redirect to previous instance
|
||||
PipePacketHeader redirectActivationPacket = default;
|
||||
redirectActivationPacket.Version = 1;
|
||||
redirectActivationPacket.Type = PipePacketType.Request;
|
||||
@@ -26,17 +64,14 @@ internal sealed class PrivateNamedPipeClient : IDisposable
|
||||
HutaoActivationArguments hutaoArgs = HutaoActivationArguments.FromAppActivationArguments(args, isRedirected: true);
|
||||
byte[] jsonBytes = JsonSerializer.SerializeToUtf8Bytes(hutaoArgs);
|
||||
|
||||
redirectActivationPacket.ContentLength = jsonBytes.Length;
|
||||
redirectActivationPacket.Checksum = XxHash64.HashToUInt64(jsonBytes);
|
||||
|
||||
clientStream.Write(new(&redirectActivationPacket, sizeof(PipePacketHeader)));
|
||||
clientStream.Write(jsonBytes);
|
||||
clientStream.WritePacket(&redirectActivationPacket, jsonBytes);
|
||||
}
|
||||
|
||||
{
|
||||
// Terminate session
|
||||
PipePacketHeader terminationPacket = default;
|
||||
terminationPacket.Version = 1;
|
||||
terminationPacket.Type = PipePacketType.Termination;
|
||||
terminationPacket.Type = PipePacketType.SessionTermination;
|
||||
|
||||
clientStream.Write(new(&terminationPacket, sizeof(PipePacketHeader)));
|
||||
}
|
||||
|
||||
@@ -18,4 +18,11 @@ internal sealed partial class PrivateNamedPipeMessageDispatcher
|
||||
|
||||
serviceProvider.GetRequiredService<IAppActivation>().Activate(args);
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
ITaskContext taskContext = serviceProvider.GetRequiredService<ITaskContext>();
|
||||
App app = serviceProvider.GetRequiredService<App>();
|
||||
taskContext.BeginInvokeOnMainThread(app.Exit);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,53 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
using System.IO.Hashing;
|
||||
using System.IO.Pipes;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace Snap.Hutao.Core.LifeCycle.InterProcess;
|
||||
|
||||
[Injection(InjectAs.Singleton)]
|
||||
[ConstructorGenerated]
|
||||
internal sealed partial class PrivateNamedPipeServer : IDisposable
|
||||
{
|
||||
private readonly PrivateNamedPipeMessageDispatcher messageDispatcher;
|
||||
private readonly RuntimeOptions runtimeOptions;
|
||||
private readonly ITaskContext taskContext;
|
||||
private readonly App app;
|
||||
|
||||
private readonly NamedPipeServerStream serverStream = new("Snap.Hutao.PrivateNamedPipe", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous | PipeOptions.WriteThrough);
|
||||
private readonly CancellationTokenSource serverTokenSource = new();
|
||||
private readonly SemaphoreSlim serverSemaphore = new(1);
|
||||
|
||||
private readonly NamedPipeServerStream serverStream;
|
||||
|
||||
public PrivateNamedPipeServer(IServiceProvider serviceProvider)
|
||||
{
|
||||
messageDispatcher = serviceProvider.GetRequiredService<PrivateNamedPipeMessageDispatcher>();
|
||||
runtimeOptions = serviceProvider.GetRequiredService<RuntimeOptions>();
|
||||
taskContext = serviceProvider.GetRequiredService<ITaskContext>();
|
||||
app = serviceProvider.GetRequiredService<App>();
|
||||
|
||||
PipeSecurity? pipeSecurity = default;
|
||||
|
||||
if (runtimeOptions.IsElevated)
|
||||
{
|
||||
SecurityIdentifier everyOne = new(WellKnownSidType.WorldSid, null);
|
||||
|
||||
pipeSecurity = new();
|
||||
pipeSecurity.AddAccessRule(new PipeAccessRule(everyOne, PipeAccessRights.FullControl, AccessControlType.Allow));
|
||||
}
|
||||
|
||||
serverStream = NamedPipeServerStreamAcl.Create(
|
||||
"Snap.Hutao.PrivateNamedPipe",
|
||||
PipeDirection.InOut,
|
||||
NamedPipeServerStream.MaxAllowedServerInstances,
|
||||
PipeTransmissionMode.Byte,
|
||||
PipeOptions.Asynchronous | PipeOptions.WriteThrough,
|
||||
0,
|
||||
0,
|
||||
pipeSecurity);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
serverTokenSource.Cancel();
|
||||
@@ -45,14 +76,6 @@ internal sealed partial class PrivateNamedPipeServer : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
private static unsafe byte[] GetValidatedContent(NamedPipeServerStream serverStream, PipePacketHeader* header)
|
||||
{
|
||||
byte[] content = new byte[header->ContentLength];
|
||||
serverStream.ReadAtLeast(content, header->ContentLength, false);
|
||||
HutaoException.ThrowIf(XxHash64.HashToUInt64(content) != header->Checksum, "PipePacket Content Hash incorrect");
|
||||
return content;
|
||||
}
|
||||
|
||||
private unsafe void RunPacketSession(NamedPipeServerStream serverStream, CancellationToken token)
|
||||
{
|
||||
Span<byte> headerSpan = stackalloc byte[sizeof(PipePacketHeader)];
|
||||
@@ -66,13 +89,28 @@ internal sealed partial class PrivateNamedPipeServer : IDisposable
|
||||
|
||||
switch ((header->Type, header->Command, header->ContentType))
|
||||
{
|
||||
case (PipePacketType.Request, PipePacketCommand.Connect, _):
|
||||
PipePacketHeader elevatedPacket = default;
|
||||
elevatedPacket.Version = 1;
|
||||
elevatedPacket.Type = PipePacketType.Response;
|
||||
elevatedPacket.ContentType = PipePacketContentType.Json;
|
||||
|
||||
byte[] elevatedBytes = JsonSerializer.SerializeToUtf8Bytes(runtimeOptions.IsElevated);
|
||||
serverStream.WritePacket(&elevatedPacket, elevatedBytes);
|
||||
|
||||
break;
|
||||
case (PipePacketType.Request, PipePacketCommand.RedirectActivation, PipePacketContentType.Json):
|
||||
ReadOnlySpan<byte> content = GetValidatedContent(serverStream, header);
|
||||
ReadOnlySpan<byte> content = serverStream.GetValidatedContent(header);
|
||||
messageDispatcher.RedirectActivation(JsonSerializer.Deserialize<HutaoActivationArguments>(content));
|
||||
break;
|
||||
case (PipePacketType.Termination, _, _):
|
||||
case (PipePacketType.SessionTermination, _, _):
|
||||
serverStream.Disconnect();
|
||||
sessionTerminated = true;
|
||||
if (header->Command is PipePacketCommand.Exit)
|
||||
{
|
||||
messageDispatcher.Exit();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +83,10 @@ internal static class LoggerExtension
|
||||
logger.LogColorized(logLevel, 0, exception, message, args);
|
||||
}
|
||||
|
||||
[SuppressMessage("", "CA2254")]
|
||||
public static void LogColorized(this ILogger logger, LogLevel logLevel, EventId eventId, Exception? exception, LogMessage message, params LogArgument[] args)
|
||||
{
|
||||
string colorizedMessage = Colorize(message, args, out object?[] outArgs)!;
|
||||
string? colorizedMessage = Colorize(message, args, out object?[] outArgs);
|
||||
logger.Log(logLevel, eventId, exception, colorizedMessage, outArgs);
|
||||
}
|
||||
|
||||
|
||||
9
src/Snap.Hutao/Snap.Hutao/Core/Shell/IJumpListInterop.cs
Normal file
9
src/Snap.Hutao/Snap.Hutao/Core/Shell/IJumpListInterop.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
namespace Snap.Hutao.Core.Shell;
|
||||
|
||||
internal interface IJumpListInterop
|
||||
{
|
||||
ValueTask ClearAsync();
|
||||
}
|
||||
22
src/Snap.Hutao/Snap.Hutao/Core/Shell/JumpListInterop.cs
Normal file
22
src/Snap.Hutao/Snap.Hutao/Core/Shell/JumpListInterop.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Windows.UI.StartScreen;
|
||||
|
||||
namespace Snap.Hutao.Core.Shell;
|
||||
|
||||
[Injection(InjectAs.Transient, typeof(IJumpListInterop))]
|
||||
internal sealed class JumpListInterop : IJumpListInterop
|
||||
{
|
||||
public async ValueTask ClearAsync()
|
||||
{
|
||||
if (JumpList.IsSupported())
|
||||
{
|
||||
JumpList list = await JumpList.LoadCurrentAsync();
|
||||
|
||||
list.Items.Clear();
|
||||
|
||||
await list.SaveAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.Win32.TaskScheduler;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Windows.Storage;
|
||||
|
||||
namespace Snap.Hutao.Core.Shell;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ internal class AsyncBarrier
|
||||
/// <param name="participants">The number of participants.</param>
|
||||
public AsyncBarrier(int participants)
|
||||
{
|
||||
Must.Range(participants >= 1, "Participants of AsyncBarrier can not be less than 1");
|
||||
ArgumentOutOfRangeException.ThrowIfLessThan(participants, 1, "Participants of AsyncBarrier can not be less than 1");
|
||||
participantCount = participants;
|
||||
|
||||
// Allocate the stack so no resizing is necessary.
|
||||
|
||||
@@ -15,7 +15,7 @@ internal static class SemaphoreSlimExtension
|
||||
}
|
||||
catch (ObjectDisposedException ex)
|
||||
{
|
||||
ThrowHelper.OperationCanceled(SH.CoreThreadingSemaphoreSlimDisposed, ex);
|
||||
HutaoException.OperationCanceled(SH.CoreThreadingSemaphoreSlimDisposed, ex);
|
||||
}
|
||||
|
||||
return new SemaphoreSlimToken(semaphoreSlim);
|
||||
@@ -29,7 +29,7 @@ internal static class SemaphoreSlimExtension
|
||||
}
|
||||
catch (ObjectDisposedException ex)
|
||||
{
|
||||
ThrowHelper.OperationCanceled(SH.CoreThreadingSemaphoreSlimDisposed, ex);
|
||||
HutaoException.OperationCanceled(SH.CoreThreadingSemaphoreSlimDisposed, ex);
|
||||
}
|
||||
|
||||
return new SemaphoreSlimToken(semaphoreSlim);
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Core.Validation;
|
||||
|
||||
/// <summary>
|
||||
/// 封装验证方法,简化微软验证
|
||||
/// </summary>
|
||||
[HighQuality]
|
||||
[Obsolete("Use HutaoException instead")]
|
||||
internal static class Must
|
||||
{
|
||||
/// <summary>
|
||||
/// Throws an <see cref="ArgumentException"/> if a condition does not evaluate to true.
|
||||
/// </summary>
|
||||
/// <param name="condition">The condition to check.</param>
|
||||
/// <param name="message">message</param>
|
||||
/// <param name="parameterName">The name of the parameter to blame in the exception, if thrown.</param>
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void Argument([DoesNotReturnIf(false)] bool condition, string? message, [CallerArgumentExpression(nameof(condition))] string? parameterName = null)
|
||||
{
|
||||
if (!condition)
|
||||
{
|
||||
throw new ArgumentException(message, parameterName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throws an <see cref="ArgumentOutOfRangeException"/> if a condition does not evaluate to true.
|
||||
/// </summary>
|
||||
/// <param name="condition">The condition to check.</param>
|
||||
/// <param name="message">message</param>
|
||||
/// <param name="parameterName">The name of the parameter to blame in the exception, if thrown.</param>
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void Range([DoesNotReturnIf(false)] bool condition, string? message, [CallerArgumentExpression(nameof(condition))] string? parameterName = null)
|
||||
{
|
||||
if (!condition)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(parameterName, message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unconditionally throws an <see cref="NotSupportedException"/>.
|
||||
/// </summary>
|
||||
/// <param name="context">上下文</param>
|
||||
/// <returns>Nothing. This method always throws.</returns>
|
||||
[DoesNotReturn]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static Exception NeverHappen(string? context = null)
|
||||
{
|
||||
throw new NotSupportedException(context);
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,6 @@ namespace Snap.Hutao.Core.Windowing.Abstraction;
|
||||
internal interface IXamlWindowHasInitSize
|
||||
{
|
||||
SizeInt32 InitSize { get; }
|
||||
|
||||
SizeInt32 MinSize { get; }
|
||||
}
|
||||
@@ -10,7 +10,7 @@ using System.Collections.Concurrent;
|
||||
namespace Snap.Hutao.Core.Windowing.Backdrop;
|
||||
|
||||
// https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.5-stable/controls/dev/Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.cpp
|
||||
internal sealed class InputActiveDesktopAcrylicBackdrop : SystemBackdrop
|
||||
internal sealed partial class InputActiveDesktopAcrylicBackdrop : SystemBackdrop
|
||||
{
|
||||
private readonly ConcurrentDictionary<ICompositionSupportsSystemBackdrop, DesktopAcrylicController> controllers = [];
|
||||
|
||||
@@ -18,11 +18,10 @@ internal sealed class InputActiveDesktopAcrylicBackdrop : SystemBackdrop
|
||||
{
|
||||
base.OnTargetConnected(target, xamlRoot);
|
||||
|
||||
DesktopAcrylicController newController = new();
|
||||
SystemBackdropConfiguration configuration = GetDefaultSystemBackdropConfiguration(target, xamlRoot);
|
||||
|
||||
configuration.IsInputActive = true;
|
||||
|
||||
DesktopAcrylicController newController = new();
|
||||
newController.AddSystemBackdropTarget(target);
|
||||
newController.SetSystemBackdropConfiguration(configuration);
|
||||
controllers.TryAdd(target, newController);
|
||||
|
||||
@@ -24,6 +24,8 @@ internal sealed class SystemBackdropDesktopWindowXamlSourceAccess : SystemBackdr
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SystemBackdrop? InnerBackdrop { get => innerBackdrop; }
|
||||
|
||||
protected override void OnTargetConnected(ICompositionSupportsSystemBackdrop target, XamlRoot xamlRoot)
|
||||
{
|
||||
DesktopWindowXamlSource = DesktopWindowXamlSource.FromAbi(target.As<IInspectable>().ThisPtr);
|
||||
|
||||
@@ -29,25 +29,26 @@ internal sealed class TransparentBackdrop : SystemBackdrop, IBackdropNeedEraseBa
|
||||
|
||||
internal Windows.UI.Composition.Compositor Compositor
|
||||
{
|
||||
get
|
||||
get => LazyInitializer.EnsureInitialized(ref compositor, ref compositorLock, () =>
|
||||
{
|
||||
return LazyInitializer.EnsureInitialized(ref compositor, ref compositorLock, () =>
|
||||
{
|
||||
DispatcherQueue.EnsureSystemDispatcherQueue();
|
||||
return new Windows.UI.Composition.Compositor();
|
||||
});
|
||||
}
|
||||
DispatcherQueue.EnsureSystemDispatcherQueue();
|
||||
return new Windows.UI.Composition.Compositor();
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnTargetConnected(ICompositionSupportsSystemBackdrop connectedTarget, XamlRoot xamlRoot)
|
||||
protected override void OnTargetConnected(ICompositionSupportsSystemBackdrop target, XamlRoot xamlRoot)
|
||||
{
|
||||
base.OnTargetConnected(target, xamlRoot);
|
||||
|
||||
brush ??= Compositor.CreateColorBrush(tintColor);
|
||||
connectedTarget.SystemBackdrop = brush;
|
||||
target.SystemBackdrop = brush;
|
||||
}
|
||||
|
||||
protected override void OnTargetDisconnected(ICompositionSupportsSystemBackdrop disconnectedTarget)
|
||||
protected override void OnTargetDisconnected(ICompositionSupportsSystemBackdrop target)
|
||||
{
|
||||
disconnectedTarget.SystemBackdrop = null;
|
||||
base.OnTargetDisconnected(target);
|
||||
|
||||
target.SystemBackdrop = null;
|
||||
|
||||
if (compositorLock is not null)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Snap.Hutao.Core.LifeCycle;
|
||||
using Snap.Hutao.Core.Setting;
|
||||
using Snap.Hutao.Model;
|
||||
using Snap.Hutao.Service.Notification;
|
||||
@@ -27,7 +26,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
|
||||
private bool registered;
|
||||
|
||||
private bool modifierHasWindows;
|
||||
private bool modifierHasControl;
|
||||
private bool modifierHasShift;
|
||||
private bool modifierHasAlt;
|
||||
@@ -36,6 +34,7 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
private VirtualKey key;
|
||||
private bool isEnabled;
|
||||
|
||||
[SuppressMessage("", "SH002")]
|
||||
public HotKeyCombination(IServiceProvider serviceProvider, HWND hwnd, string settingKey, int hotKeyId, HOT_KEY_MODIFIERS defaultModifiers, VirtualKey defaultKey)
|
||||
{
|
||||
infoBarService = serviceProvider.GetRequiredService<IInfoBarService>();
|
||||
@@ -52,7 +51,10 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
isEnabled = LocalSetting.Get($"{settingKey}.IsEnabled", true);
|
||||
|
||||
HotKeyParameter actual = LocalSettingGetHotKeyParameter();
|
||||
modifiers = actual.Modifiers;
|
||||
|
||||
// HOT_KEY_MODIFIERS.MOD_WIN is reversed for use by the OS.
|
||||
// It should not be used by the application.
|
||||
modifiers = actual.Modifiers & ~HOT_KEY_MODIFIERS.MOD_WIN;
|
||||
InitializeModifiersCompositionFields();
|
||||
key = actual.Key;
|
||||
|
||||
@@ -61,18 +63,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
}
|
||||
|
||||
#region Binding Property
|
||||
public bool ModifierHasWindows
|
||||
{
|
||||
get => modifierHasWindows;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref modifierHasWindows, value))
|
||||
{
|
||||
UpdateModifiers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ModifierHasControl
|
||||
{
|
||||
get => modifierHasControl;
|
||||
@@ -218,11 +208,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_WIN))
|
||||
{
|
||||
stringBuilder.Append("Win").Append(" + ");
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
||||
{
|
||||
stringBuilder.Append("Ctrl").Append(" + ");
|
||||
@@ -247,11 +232,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
{
|
||||
HOT_KEY_MODIFIERS modifiers = default;
|
||||
|
||||
if (ModifierHasWindows)
|
||||
{
|
||||
modifiers |= HOT_KEY_MODIFIERS.MOD_WIN;
|
||||
}
|
||||
|
||||
if (ModifierHasControl)
|
||||
{
|
||||
modifiers |= HOT_KEY_MODIFIERS.MOD_CONTROL;
|
||||
@@ -272,11 +252,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
|
||||
private void InitializeModifiersCompositionFields()
|
||||
{
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_WIN))
|
||||
{
|
||||
modifierHasWindows = true;
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
||||
{
|
||||
modifierHasControl = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ internal sealed class HotKeyMessageWindow : IDisposable
|
||||
atom = RegisterClassW(&wc);
|
||||
}
|
||||
|
||||
ArgumentOutOfRangeException.ThrowIfEqual<ushort>(atom, 0);
|
||||
ArgumentOutOfRangeException.ThrowIfZero(atom);
|
||||
|
||||
HWND = CreateWindowExW(0, WindowClassName, WindowClassName, 0, 0, 0, 0, 0, default, default, default, default);
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
x:Class="Snap.Hutao.Core.Windowing.NotifyIcon.NotifyIconContextMenu"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:cw="using:CommunityToolkit.WinUI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:shch="using:Snap.Hutao.Control.Helper"
|
||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||
xmlns:shcwb="using:Snap.Hutao.Core.Windowing.Backdrop"
|
||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||
@@ -30,7 +32,10 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Margin="8" Text="{Binding Title}"/>
|
||||
<TextBlock
|
||||
Margin="8"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{Binding Title}"/>
|
||||
<Grid Grid.Row="1" Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||
<StackPanel
|
||||
Margin="4,0"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Snap.Hutao.Control.Extension;
|
||||
using Snap.Hutao.ViewModel;
|
||||
|
||||
namespace Snap.Hutao.Core.Windowing.NotifyIcon;
|
||||
@@ -12,6 +13,6 @@ internal sealed partial class NotifyIconContextMenu : Flyout
|
||||
{
|
||||
AllowFocusOnInteraction = false;
|
||||
InitializeComponent();
|
||||
Root.DataContext = serviceProvider.GetRequiredService<NotifyIconViewModel>();
|
||||
Root.InitializeDataContext<NotifyIconViewModel>(serviceProvider);
|
||||
}
|
||||
}
|
||||
@@ -30,12 +30,14 @@ internal sealed class NotifyIconController : IDisposable
|
||||
icon = new(iconFile.Path);
|
||||
id = Unsafe.As<byte, Guid>(ref MemoryMarshal.GetArrayDataReference(MD5.HashData(Encoding.UTF8.GetBytes(iconFile.Path))));
|
||||
|
||||
xamlHostWindow = new();
|
||||
xamlHostWindow = new(serviceProvider);
|
||||
xamlHostWindow.MoveAndResize(default);
|
||||
|
||||
messageWindow = new()
|
||||
{
|
||||
TaskbarCreated = OnRecreateNotifyIconRequested,
|
||||
ContextMenuRequested = OnContextMenuRequested,
|
||||
IconSelected = OnContextMenuRequested,
|
||||
};
|
||||
|
||||
CreateNotifyIcon();
|
||||
@@ -46,8 +48,6 @@ internal sealed class NotifyIconController : IDisposable
|
||||
messageWindow.Dispose();
|
||||
NotifyIconMethods.Delete(id);
|
||||
icon.Dispose();
|
||||
|
||||
xamlHostWindow.Dispose();
|
||||
}
|
||||
|
||||
public RECT GetRect()
|
||||
|
||||
@@ -38,7 +38,7 @@ internal sealed class NotifyIconMessageWindow : IDisposable
|
||||
atom = RegisterClassW(&wc);
|
||||
}
|
||||
|
||||
ArgumentOutOfRangeException.ThrowIfEqual<ushort>(atom, 0);
|
||||
ArgumentOutOfRangeException.ThrowIfZero(atom);
|
||||
|
||||
// https://learn.microsoft.com/zh,cn/windows/win32/shell/taskbar#taskbar,creation,notification
|
||||
WM_TASKBARCREATED = RegisterWindowMessageW("TaskbarCreated");
|
||||
@@ -62,6 +62,8 @@ internal sealed class NotifyIconMessageWindow : IDisposable
|
||||
|
||||
public Action<NotifyIconMessageWindow, PointUInt16>? ContextMenuRequested { get; set; }
|
||||
|
||||
public Action<NotifyIconMessageWindow, PointUInt16>? IconSelected { get; set; }
|
||||
|
||||
public HWND HWND { get; }
|
||||
|
||||
public void Dispose()
|
||||
@@ -116,6 +118,7 @@ internal sealed class NotifyIconMessageWindow : IDisposable
|
||||
break;
|
||||
case NIN_SELECT:
|
||||
// X: wParam2.X Y: wParam2.Y Low: NIN_SELECT
|
||||
window.IconSelected?.Invoke(window, wParam2);
|
||||
break;
|
||||
case NIN_POPUPOPEN:
|
||||
// X: wParam2.X Y: 0? Low: NIN_POPUPOPEN
|
||||
@@ -145,7 +148,9 @@ internal sealed class NotifyIconMessageWindow : IDisposable
|
||||
|
||||
private readonly struct LPARAM2
|
||||
{
|
||||
#pragma warning disable CS0649
|
||||
public readonly uint Low;
|
||||
public readonly uint High;
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
}
|
||||
@@ -15,11 +15,9 @@ using static Snap.Hutao.Win32.User32;
|
||||
|
||||
namespace Snap.Hutao.Core.Windowing.NotifyIcon;
|
||||
|
||||
internal sealed class NotifyIconXamlHostWindow : Window, IDisposable, IWindowNeedEraseBackground
|
||||
internal sealed class NotifyIconXamlHostWindow : Window, IWindowNeedEraseBackground
|
||||
{
|
||||
private readonly XamlWindowSubclass subclass;
|
||||
|
||||
public NotifyIconXamlHostWindow()
|
||||
public NotifyIconXamlHostWindow(IServiceProvider serviceProvider)
|
||||
{
|
||||
Content = new Border();
|
||||
|
||||
@@ -36,10 +34,7 @@ internal sealed class NotifyIconXamlHostWindow : Window, IDisposable, IWindowNee
|
||||
presenter.SetBorderAndTitleBar(false, false);
|
||||
}
|
||||
|
||||
subclass = new(this);
|
||||
subclass.Initialize();
|
||||
|
||||
Activate();
|
||||
this.InitializeController(serviceProvider);
|
||||
}
|
||||
|
||||
public void ShowFlyoutAt(FlyoutBase flyout, Point point, RECT icon)
|
||||
@@ -53,7 +48,7 @@ internal sealed class NotifyIconXamlHostWindow : Window, IDisposable, IWindowNee
|
||||
ShowWindow(hwnd, SHOW_WINDOW_CMD.SW_NORMAL);
|
||||
SetForegroundWindow(hwnd);
|
||||
|
||||
AppWindow.MoveAndResize(StructMarshal.RectInt32(icon));
|
||||
MoveAndResize(icon);
|
||||
flyout.ShowAt(Content, new()
|
||||
{
|
||||
Placement = FlyoutPlacementMode.Auto,
|
||||
@@ -61,8 +56,8 @@ internal sealed class NotifyIconXamlHostWindow : Window, IDisposable, IWindowNee
|
||||
});
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
public void MoveAndResize(RECT icon)
|
||||
{
|
||||
subclass.Dispose();
|
||||
AppWindow.MoveAndResize(StructMarshal.RectInt32(icon));
|
||||
}
|
||||
}
|
||||
@@ -76,13 +76,17 @@ internal static class WindowExtension
|
||||
ShowWindow(GetWindowHandle(window), SHOW_WINDOW_CMD.SW_HIDE);
|
||||
}
|
||||
|
||||
public static void SetLayered(this Window window)
|
||||
public static void SetLayered(this Window window, bool full = true)
|
||||
{
|
||||
HWND hwnd = (HWND)WindowNative.GetWindowHandle(window);
|
||||
nint style = GetWindowLongPtrW(hwnd, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE);
|
||||
style |= (nint)WINDOW_EX_STYLE.WS_EX_LAYERED;
|
||||
SetWindowLongPtrW(hwnd, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE, style);
|
||||
SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 0, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_COLORKEY | LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA);
|
||||
|
||||
if (full)
|
||||
{
|
||||
SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 0, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_COLORKEY | LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void BringToForeground(this Window window)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace Snap.Hutao.Core.Windowing;
|
||||
|
||||
internal static class XamlWindowLifetime
|
||||
internal static class XamlLifetime
|
||||
{
|
||||
public static bool ApplicationLaunchedWithNotifyIcon { get; set; }
|
||||
|
||||
@@ -99,14 +99,12 @@ internal sealed class XamlWindowController
|
||||
|
||||
private void OnWindowClosed(object sender, WindowEventArgs args)
|
||||
{
|
||||
if (XamlWindowLifetime.ApplicationLaunchedWithNotifyIcon && !XamlWindowLifetime.ApplicationExiting)
|
||||
if (XamlLifetime.ApplicationLaunchedWithNotifyIcon && !XamlLifetime.ApplicationExiting)
|
||||
{
|
||||
args.Handled = true;
|
||||
window.Hide();
|
||||
|
||||
RECT iconRect = serviceProvider.GetRequiredService<NotifyIconController>().GetRect();
|
||||
RECT primaryRect = StructMarshal.RECT(DisplayArea.Primary.OuterBounds);
|
||||
if (!IntersectRect(out _, in primaryRect, in iconRect))
|
||||
if (!IsNotifyIconVisible())
|
||||
{
|
||||
new ToastContentBuilder()
|
||||
.AddText(SH.CoreWindowingNotifyIconPromotedHint)
|
||||
@@ -133,6 +131,35 @@ internal sealed class XamlWindowController
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsNotifyIconVisible()
|
||||
{
|
||||
// Shell_NotifyIconGetRect returns E_FAIL when Shell_TrayWnd is not present,
|
||||
// We pre-check it to avoid the exception.
|
||||
HWND shellTrayWnd = FindWindowExW(default, default, "Shell_TrayWnd", default);
|
||||
if (shellTrayWnd == default)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RECT iconRect = serviceProvider.GetRequiredService<NotifyIconController>().GetRect();
|
||||
|
||||
if (UniversalApiContract.IsPresent(WindowsVersion.Windows11))
|
||||
{
|
||||
RECT primaryRect = StructMarshal.RECT(DisplayArea.Primary.OuterBounds);
|
||||
return IntersectRect(out _, in primaryRect, in iconRect);
|
||||
}
|
||||
|
||||
HWND trayNotifyWnd = FindWindowExW(shellTrayWnd, default, "TrayNotifyWnd", default);
|
||||
HWND button = FindWindowExW(trayNotifyWnd, default, "Button", default);
|
||||
|
||||
if (GetWindowRect(button, out RECT buttonRect))
|
||||
{
|
||||
return !EqualRect(in buttonRect, in iconRect);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#region SystemBackdrop & ElementTheme
|
||||
|
||||
private void OnOptionsPropertyChanged(object? sender, PropertyChangedEventArgs e)
|
||||
@@ -210,15 +237,18 @@ internal sealed class XamlWindowController
|
||||
private void RecoverOrInitWindowSize(IXamlWindowHasInitSize xamlWindow)
|
||||
{
|
||||
double scale = window.GetRasterizationScale();
|
||||
SizeInt32 scaledSize = xamlWindow.InitSize.Scale(scale);
|
||||
RectInt32 rect = StructMarshal.RectInt32(scaledSize);
|
||||
RectInt32 rect = StructMarshal.RectInt32(xamlWindow.InitSize.Scale(scale));
|
||||
|
||||
if (window is IXamlWindowRectPersisted rectPersisted)
|
||||
{
|
||||
RectInt32 persistedRect = (CompactRect)LocalSetting.Get(rectPersisted.PersistRectKey, (CompactRect)rect);
|
||||
if (persistedRect.Size() >= xamlWindow.InitSize.Size())
|
||||
RectInt32 nonDpiPersistedRect = (CompactRect)LocalSetting.Get(rectPersisted.PersistRectKey, (CompactRect)rect);
|
||||
RectInt32 persistedRect = nonDpiPersistedRect.Scale(scale);
|
||||
|
||||
// If the persisted size is less than min size, we want to reset to the init size.
|
||||
// So we only recover the size when it's greater than or equal to the min size.
|
||||
if (persistedRect.Size() >= xamlWindow.MinSize.Size())
|
||||
{
|
||||
rect = persistedRect.Scale(scale);
|
||||
rect = persistedRect;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,6 +264,7 @@ internal sealed class XamlWindowController
|
||||
// prevent save value when we are maximized.
|
||||
if (!windowPlacement.ShowCmd.HasFlag(SHOW_WINDOW_CMD.SW_SHOWMAXIMIZED))
|
||||
{
|
||||
// We save the non-dpi rect here
|
||||
double scale = 1.0 / window.GetRasterizationScale();
|
||||
LocalSetting.Set(rectPersisted.PersistRectKey, (CompactRect)window.AppWindow.GetRect().Scale(scale));
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ internal sealed class XamlWindowNonRudeHWND : IDisposable
|
||||
private const string NonRudeHWND = "NonRudeHWND";
|
||||
private readonly HWND hwnd;
|
||||
|
||||
[SuppressMessage("", "SH002")]
|
||||
public XamlWindowNonRudeHWND(HWND hwnd)
|
||||
{
|
||||
this.hwnd = hwnd;
|
||||
|
||||
@@ -5,12 +5,10 @@ using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Snap.Hutao.Core.Windowing.Abstraction;
|
||||
using Snap.Hutao.Core.Windowing.Backdrop;
|
||||
using Snap.Hutao.Core.Windowing.NotifyIcon;
|
||||
using Snap.Hutao.Win32;
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using Snap.Hutao.Win32.UI.Shell;
|
||||
using Snap.Hutao.Win32.UI.WindowsAndMessaging;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using static Snap.Hutao.Win32.ComCtl32;
|
||||
@@ -87,7 +85,9 @@ internal sealed class XamlWindowSubclass : IDisposable
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
{
|
||||
if (state.window is IWindowNeedEraseBackground || state.window.SystemBackdrop is IBackdropNeedEraseBackground)
|
||||
if (state.window is IWindowNeedEraseBackground ||
|
||||
state.window.SystemBackdrop is IBackdropNeedEraseBackground ||
|
||||
state.window.SystemBackdrop is SystemBackdropDesktopWindowXamlSourceAccess { InnerBackdrop: IBackdropNeedEraseBackground })
|
||||
{
|
||||
return (LRESULT)(int)BOOL.TRUE;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ internal sealed class XamlWindowSubclass : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
if (XamlWindowLifetime.ApplicationExiting)
|
||||
if (XamlLifetime.ApplicationExiting)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
namespace Snap.Hutao.Core;
|
||||
|
||||
// See %PROGRAMFILES(X86)%\Windows Kits\10\Platforms\UAP\
|
||||
// Windows.Foundation.UniversalApiContract
|
||||
internal enum WindowsVersion : ushort
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -15,7 +15,7 @@ internal sealed partial class ProgressFactory : IProgressFactory
|
||||
{
|
||||
if (taskContext is not ITaskContextUnsafe @unsafe)
|
||||
{
|
||||
throw ThrowHelper.NotSupported();
|
||||
throw HutaoException.NotSupported();
|
||||
}
|
||||
|
||||
return new DispatcherQueueProgress<T>(handler, @unsafe.DispatcherQueue);
|
||||
|
||||
@@ -14,7 +14,6 @@ global using Snap.Hutao.Core.Annotation;
|
||||
global using Snap.Hutao.Core.DependencyInjection;
|
||||
global using Snap.Hutao.Core.DependencyInjection.Annotation;
|
||||
global using Snap.Hutao.Core.Threading;
|
||||
global using Snap.Hutao.Core.Validation;
|
||||
global using Snap.Hutao.Extension;
|
||||
global using Snap.Hutao.Resource.Localization;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Snap.Hutao.Core.Setting;
|
||||
using Snap.Hutao.Core.Windowing;
|
||||
@@ -28,6 +29,12 @@ internal sealed partial class GuideWindow : Window,
|
||||
public GuideWindow(IServiceProvider serviceProvider)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (AppWindow.Presenter is OverlappedPresenter presenter)
|
||||
{
|
||||
presenter.IsMaximizable = false;
|
||||
}
|
||||
|
||||
this.InitializeController(serviceProvider);
|
||||
}
|
||||
|
||||
@@ -37,6 +44,8 @@ internal sealed partial class GuideWindow : Window,
|
||||
|
||||
public SizeInt32 InitSize { get; } = new(MinWidth, MinHeight);
|
||||
|
||||
public SizeInt32 MinSize { get; } = new(MinWidth, MinHeight);
|
||||
|
||||
public unsafe void HandleMinMaxInfo(ref MINMAXINFO info, double scalingFactor)
|
||||
{
|
||||
info.ptMinTrackSize.x = (int)Math.Max(MinWidth * scalingFactor, info.ptMinTrackSize.x);
|
||||
|
||||
@@ -47,6 +47,8 @@ internal sealed partial class LaunchGameWindow : Window,
|
||||
|
||||
public SizeInt32 InitSize { get; } = new(MaxWidth, MaxHeight);
|
||||
|
||||
public SizeInt32 MinSize { get; } = new(MinWidth, MinHeight);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
@@ -39,6 +39,8 @@ internal sealed partial class MainWindow : Window,
|
||||
|
||||
public SizeInt32 InitSize { get; } = new(1200, 741);
|
||||
|
||||
public SizeInt32 MinSize { get; } = new(MinWidth, MinHeight);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public unsafe void HandleMinMaxInfo(ref MINMAXINFO pInfo, double scalingFactor)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Snap.Hutao.Core.Abstraction;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
using Snap.Hutao.Core.Setting;
|
||||
using Snap.Hutao.Model.Intrinsic;
|
||||
using Snap.Hutao.Model.Metadata.Avatar;
|
||||
@@ -97,7 +98,7 @@ internal sealed class CalculableSkill
|
||||
SkillType.A => SettingKeys.CultivationAvatarSkillACurrent,
|
||||
SkillType.E => SettingKeys.CultivationAvatarSkillECurrent,
|
||||
SkillType.Q => SettingKeys.CultivationAvatarSkillQCurrent,
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ internal sealed class CalculableSkill
|
||||
SkillType.A => SettingKeys.CultivationAvatarSkillATarget,
|
||||
SkillType.E => SettingKeys.CultivationAvatarSkillETarget,
|
||||
SkillType.Q => SettingKeys.CultivationAvatarSkillQTarget,
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core.Abstraction;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
using Snap.Hutao.Model.Entity.Primitive;
|
||||
using Snap.Hutao.Service.Cultivation;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -63,7 +64,7 @@ internal sealed class CultivateEntryLevelInformation : IMappingFrom<CultivateEnt
|
||||
WeaponLevelFrom = source.WeaponLevelFrom,
|
||||
WeaponLevelTo = source.WeaponLevelTo,
|
||||
},
|
||||
_ => throw Must.NeverHappen($"不支持的养成类型{type}"),
|
||||
_ => throw HutaoException.NotSupported($"不支持的养成类型{type}"),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Snap.Hutao.Core.Abstraction;
|
||||
using Snap.Hutao.Model.Entity.Abstraction;
|
||||
using Snap.Hutao.Model.Primitive;
|
||||
using Snap.Hutao.ViewModel.DailyNote;
|
||||
using Snap.Hutao.ViewModel.User;
|
||||
using Snap.Hutao.Web.Hoyolab.Takumi.Binding;
|
||||
|
||||
@@ -20,7 +20,7 @@ internal sealed class AppDbContextDesignTimeFactory : IDesignTimeDbContextFactor
|
||||
string userdataDbName = @"D:\Hutao\Userdata.db";
|
||||
return AppDbContext.Create(default!, $"Data Source={userdataDbName}");
|
||||
#else
|
||||
throw Must.NeverHappen();
|
||||
throw Core.ExceptionService.HutaoException.NotSupported();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,25 +11,25 @@ namespace Snap.Hutao.Model.Intrinsic.Frozen;
|
||||
[HighQuality]
|
||||
internal static class IntrinsicFrozen
|
||||
{
|
||||
public static FrozenSet<string> AssociationTypes { get; } = Enum.GetValues<AssociationType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
public static FrozenSet<string> AssociationTypes { get; } = NamesFromEnum<AssociationType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<NameValue<AssociationType>> AssociationTypeNameValues { get; } = Enum.GetValues<AssociationType>().Select(e => new NameValue<AssociationType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
public static FrozenSet<NameValue<AssociationType>> AssociationTypeNameValues { get; } = NameValuesFromEnum<AssociationType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<string> WeaponTypes { get; } = Enum.GetValues<WeaponType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
public static FrozenSet<string> WeaponTypes { get; } = NamesFromEnum<WeaponType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<NameValue<WeaponType>> WeaponTypeNameValues { get; } = Enum.GetValues<WeaponType>().Select(e => new NameValue<WeaponType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
public static FrozenSet<NameValue<WeaponType>> WeaponTypeNameValues { get; } = NameValuesFromEnum<WeaponType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<string> ItemQualities { get; } = Enum.GetValues<QualityType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
public static FrozenSet<string> ItemQualities { get; } = NamesFromEnum<QualityType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<NameValue<QualityType>> ItemQualityNameValues { get; } = Enum.GetValues<QualityType>().Select(e => new NameValue<QualityType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
public static FrozenSet<NameValue<QualityType>> ItemQualityNameValues { get; } = NameValuesFromEnum<QualityType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<string> BodyTypes { get; } = Enum.GetValues<BodyType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
public static FrozenSet<string> BodyTypes { get; } = NamesFromEnum<BodyType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<NameValue<BodyType>> BodyTypeNameValues { get; } = Enum.GetValues<BodyType>().Select(e => new NameValue<BodyType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
public static FrozenSet<NameValue<BodyType>> BodyTypeNameValues { get; } = NameValuesFromEnum<BodyType>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<string> FightProperties { get; } = Enum.GetValues<FightProperty>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
public static FrozenSet<string> FightProperties { get; } = NamesFromEnum<FightProperty>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<NameValue<FightProperty>> FightPropertyNameValues { get; } = Enum.GetValues<FightProperty>().Select(e => new NameValue<FightProperty>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
public static FrozenSet<NameValue<FightProperty>> FightPropertyNameValues { get; } = NameValuesFromEnum<FightProperty>(e => e.GetLocalizedDescriptionOrDefault());
|
||||
|
||||
public static FrozenSet<string> ElementNames { get; } = FrozenSet.ToFrozenSet(
|
||||
[
|
||||
@@ -63,4 +63,50 @@ internal static class IntrinsicFrozen
|
||||
SH.ModelMetadataMaterialWeaponEnhancementMaterial,
|
||||
SH.ModelMetadataMaterialWeaponAscensionMaterial,
|
||||
]);
|
||||
|
||||
private static FrozenSet<string> NamesFromEnum<TEnum>(Func<TEnum, string?> selector)
|
||||
where TEnum : struct, Enum
|
||||
{
|
||||
return NamesFromEnumValues(Enum.GetValues<TEnum>(), selector);
|
||||
}
|
||||
|
||||
private static FrozenSet<string> NamesFromEnumValues<TEnum>(TEnum[] values, Func<TEnum, string?> selector)
|
||||
{
|
||||
return NotNull(values, selector).ToFrozenSet();
|
||||
|
||||
static IEnumerable<string> NotNull(TEnum[] values, Func<TEnum, string?> selector)
|
||||
{
|
||||
foreach (TEnum value in values)
|
||||
{
|
||||
string? name = selector(value);
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
yield return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static FrozenSet<NameValue<TEnum>> NameValuesFromEnum<TEnum>(Func<TEnum, string?> selector)
|
||||
where TEnum : struct, Enum
|
||||
{
|
||||
return NameValuesFromEnumValues(Enum.GetValues<TEnum>(), selector);
|
||||
}
|
||||
|
||||
private static FrozenSet<NameValue<TEnum>> NameValuesFromEnumValues<TEnum>(TEnum[] values, Func<TEnum, string?> selector)
|
||||
{
|
||||
return NotNull(values, selector).ToFrozenSet();
|
||||
|
||||
static IEnumerable<NameValue<TEnum>> NotNull(TEnum[] values, Func<TEnum, string?> selector)
|
||||
{
|
||||
foreach (TEnum value in values)
|
||||
{
|
||||
string? name = selector(value);
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
yield return new(name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Control;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
using Snap.Hutao.Model.Intrinsic;
|
||||
|
||||
namespace Snap.Hutao.Model.Metadata.Converter;
|
||||
@@ -21,7 +22,7 @@ internal sealed class AssociationTypeIconConverter : ValueConverter<AssociationT
|
||||
AssociationType.ASSOC_TYPE_FONTAINE => "Fontaine",
|
||||
AssociationType.ASSOC_TYPE_NATLAN => default,
|
||||
AssociationType.ASSOC_TYPE_SNEZHNAYA => default,
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
|
||||
return association is null
|
||||
|
||||
@@ -68,7 +68,7 @@ internal sealed partial class DescriptionsParametersDescriptor : ValueConverter<
|
||||
}
|
||||
else
|
||||
{
|
||||
ThrowHelper.InvalidOperation($"ParameterFormat failed, value: `{desc}`", default);
|
||||
HutaoException.InvalidOperation($"ParameterFormat failed, value: `{desc}`", default);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Control;
|
||||
using Snap.Hutao.Core.ExceptionService;
|
||||
using Snap.Hutao.Model.Intrinsic;
|
||||
using System.Collections.Frozen;
|
||||
|
||||
@@ -41,7 +42,7 @@ internal sealed class WeaponTypeIconConverter : ValueConverter<WeaponType, Uri>
|
||||
WeaponType.WEAPON_POLE => "03",
|
||||
WeaponType.WEAPON_CLAYMORE => "04",
|
||||
WeaponType.WEAPON_CATALYST => "Catalyst_MD",
|
||||
_ => throw Must.NeverHappen(),
|
||||
_ => throw HutaoException.NotSupported(),
|
||||
};
|
||||
|
||||
return Web.HutaoEndpoints.StaticRaw("Skill", $"Skill_A_{weapon}.png").ToUri();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Identity
|
||||
Name="60568DGPStudio.SnapHutao"
|
||||
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
||||
Version="1.10.1.0" />
|
||||
Version="1.10.2.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Snap Hutao</DisplayName>
|
||||
@@ -46,12 +46,12 @@
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<desktop:Extension Category="windows.toastNotificationActivation">
|
||||
<desktop:ToastNotificationActivation ToastActivatorCLSID="5760ec4d-f7e8-4666-a965-9886d7dffe7d"/>
|
||||
<desktop:ToastNotificationActivation ToastActivatorCLSID="5760EC4D-F7E8-4666-A965-9886D7DFFE7D"/>
|
||||
</desktop:Extension>
|
||||
<com:Extension Category="windows.comServer">
|
||||
<com:ComServer>
|
||||
<com:ExeServer Executable="Snap.Hutao.exe" Arguments="-ToastActivated" DisplayName="Snap Hutao Toast Activator">
|
||||
<com:Class Id="5760ec4d-f7e8-4666-a965-9886d7dffe7d" DisplayName="Snap Hutao Toast Activator"/>
|
||||
<com:Class Id="5760EC4D-F7E8-4666-A965-9886D7DFFE7D" DisplayName="Snap Hutao Toast Activator"/>
|
||||
</com:ExeServer>
|
||||
</com:ComServer>
|
||||
</com:Extension>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Identity
|
||||
Name="60568DGPStudio.SnapHutaoDev"
|
||||
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
||||
Version="1.10.1.0" />
|
||||
Version="1.10.2.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Snap Hutao Dev</DisplayName>
|
||||
@@ -46,12 +46,12 @@
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<desktop:Extension Category="windows.toastNotificationActivation">
|
||||
<desktop:ToastNotificationActivation ToastActivatorCLSID="5760ec4d-f7e8-4666-a965-9886d7dffe7d"/>
|
||||
<desktop:ToastNotificationActivation ToastActivatorCLSID="F32B561D-752E-472B-A22C-85824D421E1A"/>
|
||||
</desktop:Extension>
|
||||
<com:Extension Category="windows.comServer">
|
||||
<com:ComServer>
|
||||
<com:ExeServer Executable="Snap.Hutao.exe" Arguments="-ToastActivated" DisplayName="Snap Hutao Dev Toast Activator">
|
||||
<com:Class Id="5760ec4d-f7e8-4666-a965-9886d7dffe7d" DisplayName="Snap Hutao Dev Toast Activator"/>
|
||||
<com:Class Id="F32B561D-752E-472B-A22C-85824D421E1A" DisplayName="Snap Hutao Dev Toast Activator"/>
|
||||
</com:ExeServer>
|
||||
</com:ComServer>
|
||||
</com:Extension>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Snap.Hutao.Core.Windowing.NotifyIcon;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using WinRT;
|
||||
|
||||
// Visible to test project.
|
||||
[assembly: InternalsVisibleTo("Snap.Hutao.Test")]
|
||||
[assembly: DisableRuntimeMarshalling]
|
||||
|
||||
namespace Snap.Hutao;
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>Register [{0}] hotkey [{1}] failed</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>Launch</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>Dark</value>
|
||||
</data>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>Can't add plan with invalid name</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>Realtime Note Webhook URL successfully configured</value>
|
||||
</data>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>Notification Settings</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>Refresh</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>Refresh</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>Do not disturb during Genshin gaming</value>
|
||||
</data>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>Shortcut Keys</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>Official Website</value>
|
||||
</data>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>Weapon WIKI</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>Copied to clipboard</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>All Archon Quest Completed</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>Completed</value>
|
||||
</data>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{1}] network request exception in [{0}] please try again later</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>Monitor ID</value>
|
||||
</data>
|
||||
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>Échec de l'enregistrement de [{0}] en touche de raccourci [{1}]</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>Lanceur de jeu</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>Sombre</value>
|
||||
</data>
|
||||
@@ -409,7 +421,7 @@
|
||||
<comment>Need EXACT same string in game</comment>
|
||||
</data>
|
||||
<data name="ModelMetadataAvatarPlayerName" xml:space="preserve">
|
||||
<value>旅行者</value>
|
||||
<value>Voyageur</value>
|
||||
</data>
|
||||
<data name="ModelMetadataFetterInfoBirthdayFormat" xml:space="preserve">
|
||||
<value>{0} 月 {1} 日</value>
|
||||
@@ -1473,7 +1485,7 @@
|
||||
<value>有新的通知</value>
|
||||
</data>
|
||||
<data name="ViewLaunchGameHeader" xml:space="preserve">
|
||||
<value>启动游戏</value>
|
||||
<value>Lanceur de jeu</value>
|
||||
</data>
|
||||
<data name="ViewListViewDragElevatedHint" xml:space="preserve">
|
||||
<value>管理员模式下无法拖动排序</value>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>不能添加名称无效的计划</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>实时便笺 Webhook Url 配置成功</value>
|
||||
</data>
|
||||
@@ -1647,7 +1665,7 @@
|
||||
<value>我已阅读并同意上方的条款</value>
|
||||
</data>
|
||||
<data name="ViewModelGuideActionComplete" xml:space="preserve">
|
||||
<value>完成</value>
|
||||
<value>Terminer</value>
|
||||
</data>
|
||||
<data name="ViewModelGuideActionNext" xml:space="preserve">
|
||||
<value>下一步</value>
|
||||
@@ -1773,7 +1791,7 @@
|
||||
<value>下载完成</value>
|
||||
</data>
|
||||
<data name="ViewModelWelcomeDownloadSummaryComplete" xml:space="preserve">
|
||||
<value>完成</value>
|
||||
<value>Terminer</value>
|
||||
</data>
|
||||
<data name="ViewModelWelcomeDownloadSummaryContentTypeNotMatch" xml:space="preserve">
|
||||
<value>响应内容不是有效的文件字节流</value>
|
||||
@@ -1791,7 +1809,7 @@
|
||||
<value>创建新存档以继续</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementExportLabel" xml:space="preserve">
|
||||
<value>导出</value>
|
||||
<value>Exporter</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementImportFromClipboard" xml:space="preserve">
|
||||
<value>从剪贴板导入</value>
|
||||
@@ -1800,7 +1818,7 @@
|
||||
<value>从 UIAF 文件导入</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementImportLabel" xml:space="preserve">
|
||||
<value>导入</value>
|
||||
<value>Importer</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementRemoveArchive" xml:space="preserve">
|
||||
<value>删除当前存档</value>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>通知设置</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>立即刷新</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>刷新</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>在我游玩原神时不通知我</value>
|
||||
</data>
|
||||
@@ -2031,7 +2055,7 @@
|
||||
<value>全量刷新</value>
|
||||
</data>
|
||||
<data name="ViewPageGachaLogExportAction" xml:space="preserve">
|
||||
<value>导出</value>
|
||||
<value>Exporter</value>
|
||||
</data>
|
||||
<data name="ViewPageGachaLogHint" xml:space="preserve">
|
||||
<value>尚未获取任何祈愿记录</value>
|
||||
@@ -2067,7 +2091,7 @@
|
||||
<value>上传当前的祈愿存档</value>
|
||||
</data>
|
||||
<data name="ViewPageGachaLogImportAction" xml:space="preserve">
|
||||
<value>导入</value>
|
||||
<value>Importer</value>
|
||||
</data>
|
||||
<data name="ViewPageGachaLogImportDescription" xml:space="preserve">
|
||||
<value>导入来自其它 App 的数据</value>
|
||||
@@ -2238,7 +2262,7 @@
|
||||
<value>请输入验证码</value>
|
||||
</data>
|
||||
<data name="ViewPageLaunchGameAction" xml:space="preserve">
|
||||
<value>启动游戏</value>
|
||||
<value>Lanceur de jeu</value>
|
||||
</data>
|
||||
<data name="ViewPageLaunchGameAdvanceHeader" xml:space="preserve">
|
||||
<value>高级功能</value>
|
||||
@@ -2583,7 +2607,7 @@
|
||||
<value>祈愿记录</value>
|
||||
</data>
|
||||
<data name="ViewpageSettingHomeCardItemLaunchGameHeader" xml:space="preserve">
|
||||
<value>启动游戏</value>
|
||||
<value>Lanceur de jeu</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingHomeCardOff" xml:space="preserve">
|
||||
<value>隐藏</value>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>快捷键</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>前往官网</value>
|
||||
</data>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>武器资料</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>已复制到剪贴板</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>所有魔神任务已完成</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>全部完成</value>
|
||||
</data>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{0}] 中的 [{1}] 网络请求异常,请稍后再试</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>显示器编号</value>
|
||||
</data>
|
||||
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>[{0}] Hotkey [{1}] gagal terdaftar</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>Luncurkan</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>深色</value>
|
||||
</data>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>Tidak dapat menambahkan rencana dengan nama yang salah.</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>URL Webhook Catatan Realtime berhasil dikonfigurasi.</value>
|
||||
</data>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>Pengaturan notifikasi</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>Segarkan sekarang</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>Perbarui</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>Jangan ganggu selama bermain Genshin</value>
|
||||
</data>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>Tombol Pintas</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>Website Resmi</value>
|
||||
</data>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>Senjata WIKI</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>Disalin ke clipboard</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>所有魔神任务已完成</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>Selesai</value>
|
||||
</data>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{1}] pengecualian permintaan jaringan di [{0}], harap coba lagi nanti</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>ID Monitor</value>
|
||||
</data>
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<value>保存</value>
|
||||
</data>
|
||||
<data name="ControlAutoSuggestBoxNotFoundValue" xml:space="preserve">
|
||||
<value>未找到结果</value>
|
||||
<value>検索結果なし</value>
|
||||
</data>
|
||||
<data name="ControlImageCachedImageInvalidResourceUri" xml:space="preserve">
|
||||
<value>無効なURL</value>
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>[{0}] 热键 [{1}] 注册失败</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>ゲームランチャー</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>深色</value>
|
||||
</data>
|
||||
@@ -783,13 +795,13 @@
|
||||
<value>キャラクターラインナップ:{0:MM-dd HH:mm}</value>
|
||||
</data>
|
||||
<data name="ServiceBackgroundImageTypeBing" xml:space="preserve">
|
||||
<value>必应每日一图</value>
|
||||
<value>Bingからのランダム画像</value>
|
||||
</data>
|
||||
<data name="ServiceBackgroundImageTypeDaily" xml:space="preserve">
|
||||
<value>胡桃每日一图</value>
|
||||
<value>日替わり胡桃画像</value>
|
||||
</data>
|
||||
<data name="ServiceBackgroundImageTypeLauncher" xml:space="preserve">
|
||||
<value>官方启动器壁纸</value>
|
||||
<value>公式ランチャー背景</value>
|
||||
</data>
|
||||
<data name="ServiceBackgroundImageTypeLocalFolder" xml:space="preserve">
|
||||
<value>本地随机图片</value>
|
||||
@@ -873,7 +885,7 @@
|
||||
<value>イベント祈願・キャラクター</value>
|
||||
</data>
|
||||
<data name="ServiceGachaLogFactoryChronicledWishName" xml:space="preserve">
|
||||
<value>集录祈愿</value>
|
||||
<value>集録祈願</value>
|
||||
</data>
|
||||
<data name="ServiceGachaLogFactoryPermanentWishName" xml:space="preserve">
|
||||
<value>奔走世間</value>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>育成計画名に無効な言葉が入っています</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>リアルタイムノートのWebhook URLの設定に成功しました。</value>
|
||||
</data>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>通知設定</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>すぐに更新</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>更新</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>プレイ中に通知をオフ</value>
|
||||
</data>
|
||||
@@ -2654,14 +2678,20 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>ショートカットキー</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>公式サイト</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOpenBackgroundImageFolderDescription" xml:space="preserve">
|
||||
<value>自定义背景图片,支持 bmp / gif / ico / jpg / jpeg / png / tiff / webp 格式</value>
|
||||
<value>カスタム背景を設定する / bmp、git、ico、jpg、jpeg、png、tiff、webp形式をサポートしています</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOpenBackgroundImageFolderHeader" xml:space="preserve">
|
||||
<value>打开背景图片文件夹</value>
|
||||
<value>カスタム背景フォルダーを開く</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingResetAction" xml:space="preserve">
|
||||
<value>リセット</value>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>武器一覧</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>クリップボードにコピーしました。</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>所有魔神任务已完成</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>すべて完了</value>
|
||||
</data>
|
||||
@@ -3171,7 +3204,7 @@
|
||||
<value>イベント祈願・キャラクター2</value>
|
||||
</data>
|
||||
<data name="WebGachaConfigTypeChronicledWish" xml:space="preserve">
|
||||
<value>集录祈愿</value>
|
||||
<value>集録祈願</value>
|
||||
</data>
|
||||
<data name="WebGachaConfigTypeNoviceWish" xml:space="preserve">
|
||||
<value>初心者祈願</value>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{0}] の[{1}] のリクエストにエラーが発生、時間をおいてから試してください</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>モニターID</value>
|
||||
</data>
|
||||
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>[{0}] 热键 [{1}] 注册失败</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>게임 시작</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>深色</value>
|
||||
</data>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>잘못된 이름을 가진 일정은 추가할 수 없습니다</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>实时便笺 Webhook Url 配置成功</value>
|
||||
</data>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>알림 설정</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>지금 동기화</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>동기화</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>원신을 플레이 할 때 알리지 않음</value>
|
||||
</data>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>快捷键</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>공식 홈페이지로 이동</value>
|
||||
</data>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>무기 자료</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>已复制到剪贴板</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>所有魔神任务已完成</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>全部完成</value>
|
||||
</data>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{0}] 中的 [{1}] 网络请求异常,请稍后再试</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>显示器编号</value>
|
||||
</data>
|
||||
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>Falha ao definir atalho [{0}] para [{1}].</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>Iniciar</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>Tema Escuro</value>
|
||||
</data>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>Não é possível adicionar um plano com nome inválido</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>URL do webhook de lembrete de tempo real configurado com sucesso</value>
|
||||
</data>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>Configurações de notificação</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>Atualizar</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>Atualizar</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>Não incomodar durante o Genshin</value>
|
||||
</data>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>Teclas de atalho</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>Site oficial</value>
|
||||
</data>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>Wiki de armas</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>Copiado para a área de transferência</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>Todas as missões de arconte concluídas</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>Concluído</value>
|
||||
</data>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{1}] erro de solicitação de rede em [{0}], tente novamente mais tarde</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>ID do monitor</value>
|
||||
</data>
|
||||
|
||||
@@ -1568,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>不能添加名称无效的计划</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>实时便笺 Webhook Url 配置成功</value>
|
||||
</data>
|
||||
@@ -1958,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>通知设置</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>立即刷新</value>
|
||||
</data>
|
||||
@@ -1988,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>刷新</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>在我游玩原神时不通知我</value>
|
||||
</data>
|
||||
@@ -3024,7 +3036,7 @@
|
||||
<value>武器资料</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3245,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{0}] 中的 [{1}] 网络请求异常,请稍后再试</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>显示器编号</value>
|
||||
</data>
|
||||
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>Регистрация [{0}] горячей клавиши [{1}] не удалась</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>Game Launcher</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已进入后台运行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>Тёмная</value>
|
||||
</data>
|
||||
@@ -1173,40 +1185,40 @@
|
||||
<value>Режим импорта</value>
|
||||
</data>
|
||||
<data name="ViewDialogAchievementArchiveImportStrategyAggressive" xml:space="preserve">
|
||||
<value>贪婪(添加新数据,更新已完成项)</value>
|
||||
<value>Жадно (добавляют новые данные, обновляют завершенные записи)</value>
|
||||
</data>
|
||||
<data name="ViewDialogAchievementArchiveImportStrategyLazy" xml:space="preserve">
|
||||
<value>懒惰(添加新数据,跳过已完成项)</value>
|
||||
<value>Лениво (добавление новых данных, пропуск завершенных записей)</value>
|
||||
</data>
|
||||
<data name="ViewDialogAchievementArchiveImportStrategyOverwrite" xml:space="preserve">
|
||||
<value>覆盖(删除老数据,添加新的数据)</value>
|
||||
<value>Перезапись (удаление старых данных, добавление новых)</value>
|
||||
</data>
|
||||
<data name="ViewDialogAchievementArchiveImportTitle" xml:space="preserve">
|
||||
<value>Импорт данных о достижениях в текущий архив</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateBatchAvatarLevelTarget" xml:space="preserve">
|
||||
<value>角色目标等级</value>
|
||||
<value>Целевой уровень персонажа</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateBatchSkillATarget" xml:space="preserve">
|
||||
<value>普通攻击目标等级</value>
|
||||
<value>Уровень цели обычной атаки</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateBatchSkillETarget" xml:space="preserve">
|
||||
<value>元素战技目标等级</value>
|
||||
<value>Целевой уровень Элементального навыка</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateBatchSkillQTarget" xml:space="preserve">
|
||||
<value>元素爆发目标等级</value>
|
||||
<value>Целевой уровень Взрыва стихий</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateBatchWeaponLevelTarget" xml:space="preserve">
|
||||
<value>武器目标等级</value>
|
||||
<value>Целевой уровень оружия</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateProjectAttachUid" xml:space="preserve">
|
||||
<value>绑定当前用户与角色</value>
|
||||
<value>Связать текущего пользователя и роль</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateProjectInputPlaceholder" xml:space="preserve">
|
||||
<value>在此处输入计划名称</value>
|
||||
<value>Введите название плана</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivateProjectTitle" xml:space="preserve">
|
||||
<value>创建新的养成计划</value>
|
||||
<value>Создание нового плана</value>
|
||||
</data>
|
||||
<data name="ViewDialogCultivatePromotionDeltaBatchTitle" xml:space="preserve">
|
||||
<value>批量添加或更新到当前养成计划</value>
|
||||
@@ -1218,7 +1230,7 @@
|
||||
<value>每日委托上线提醒</value>
|
||||
</data>
|
||||
<data name="ViewDialogDailyNoteNotificationExpeditionNotify" xml:space="preserve">
|
||||
<value>探索派遣完成提醒</value>
|
||||
<value>Уведомление об окончании экспедиции</value>
|
||||
</data>
|
||||
<data name="ViewDialogDailyNoteNotificationHomeCoinNotifyThreshold" xml:space="preserve">
|
||||
<value>洞天宝钱提醒阈值</value>
|
||||
@@ -1236,7 +1248,7 @@
|
||||
<value>参量质变仪提醒</value>
|
||||
</data>
|
||||
<data name="ViewDialogDailyNoteWebhookUrlInputPlaceholder" xml:space="preserve">
|
||||
<value>请输入 Url</value>
|
||||
<value>Пожалуйста, введите URL</value>
|
||||
</data>
|
||||
<data name="ViewDialogDailyNoteWebhookUrlTitle" xml:space="preserve">
|
||||
<value>实时便笺 Webhook Url</value>
|
||||
@@ -1260,7 +1272,7 @@
|
||||
<value>获取祈愿物品中</value>
|
||||
</data>
|
||||
<data name="ViewDialogGachaLogUrlInputPlaceholder" xml:space="preserve">
|
||||
<value>请输入 Url</value>
|
||||
<value>Пожалуйста, введите URL</value>
|
||||
</data>
|
||||
<data name="ViewDialogGachaLogUrlTitle" xml:space="preserve">
|
||||
<value>手动输入祈愿记录 Url</value>
|
||||
@@ -1287,7 +1299,7 @@
|
||||
<value>将会通过 GET 方式对接口发送请求</value>
|
||||
</data>
|
||||
<data name="ViewDialogGeetestCustomUrlSampleHeader" xml:space="preserve">
|
||||
<value>示例</value>
|
||||
<value>Пример</value>
|
||||
</data>
|
||||
<data name="ViewDialogGeetestCustomUrlTitle" xml:space="preserve">
|
||||
<value>配置无感验证接口</value>
|
||||
@@ -1329,13 +1341,13 @@
|
||||
<value>UIGF 版本</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGameAccountInputPlaceholder" xml:space="preserve">
|
||||
<value>在此处输入名称</value>
|
||||
<value>Введите имя</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGameAccountTitle" xml:space="preserve">
|
||||
<value>为账号命名</value>
|
||||
<value>Назовите ваш аккаунт</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGameConfigurationFixDialogHint" xml:space="preserve">
|
||||
<value>请选择当前游戏路径对应的游戏服务器</value>
|
||||
<value>Пожалуйста, выберите ваш игровой сервер</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGameConfigurationFixDialogTitle" xml:space="preserve">
|
||||
<value>Восстановление файла конфигурации</value>
|
||||
@@ -1347,7 +1359,7 @@
|
||||
<value>正在转换客户端</value>
|
||||
</data>
|
||||
<data name="ViewDialogQRCodeTitle" xml:space="preserve">
|
||||
<value>使用米游社扫描二维码</value>
|
||||
<value>Отсканируйте QR-код с помощью Miyusha</value>
|
||||
</data>
|
||||
<data name="ViewDialogReconfirmTextHeader" xml:space="preserve">
|
||||
<value>为防止你在无意间启用,请输入正在启用的功能开关的<b>标题名称</b></value>
|
||||
@@ -1356,7 +1368,7 @@
|
||||
<value>你正在启用一个危险功能</value>
|
||||
</data>
|
||||
<data name="ViewDialogSettingDeleteUserDataContent" xml:space="preserve">
|
||||
<value>该操作是不可逆的,所有用户登录状态会丢失</value>
|
||||
<value>Эта операция необратима, и все входы пользователей в систему будут удалены</value>
|
||||
</data>
|
||||
<data name="ViewDialogSettingDeleteUserDataTitle" xml:space="preserve">
|
||||
<value>是否永久删除用户数据</value>
|
||||
@@ -1368,7 +1380,7 @@
|
||||
<value>当前未登录胡桃账号,上传深渊数据无法获赠胡桃云时长</value>
|
||||
</data>
|
||||
<data name="ViewDialogSpiralAbyssUploadRecordHomaNotLoginPrimaryButtonText" xml:space="preserve">
|
||||
<value>继续上传</value>
|
||||
<value>Продолжить загрузку</value>
|
||||
</data>
|
||||
<data name="ViewDialogSpiralAbyssUploadRecordHomaNotLoginTitle" xml:space="preserve">
|
||||
<value>上传深渊数据</value>
|
||||
@@ -1389,37 +1401,37 @@
|
||||
<value>在此处输入包含 SToken 的 Cookie</value>
|
||||
</data>
|
||||
<data name="ViewDialogUserTitle" xml:space="preserve">
|
||||
<value>设置 Cookie</value>
|
||||
<value>Установка cookie-файлов</value>
|
||||
</data>
|
||||
<data name="ViewFeedbackHeader" xml:space="preserve">
|
||||
<value>反馈中心</value>
|
||||
<value>Центр обратной связи</value>
|
||||
</data>
|
||||
<data name="ViewGachaLogHeader" xml:space="preserve">
|
||||
<value>祈愿记录</value>
|
||||
<value>История молитв</value>
|
||||
</data>
|
||||
<data name="ViewGuideStaticResourceDownloadSize" xml:space="preserve">
|
||||
<value>预计下载大小:{0}</value>
|
||||
<value>Примерный размер загрузки: {0}</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementIHaveReadText" xml:space="preserve">
|
||||
<value>我已阅读并同意</value>
|
||||
<value>Я прочитал и согласен с</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementIssueReport" xml:space="preserve">
|
||||
<value>问题报告方式与流程</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementOpenSourceLicense" xml:space="preserve">
|
||||
<value>Snap Hutao 开源许可</value>
|
||||
<value>Лицензия с открытым исходным кодом Snap Hutao</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementPrivacyPolicy" xml:space="preserve">
|
||||
<value>用户数据与隐私权益</value>
|
||||
<value>Данные пользователя и права на конфиденциальность</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementTermOfService" xml:space="preserve">
|
||||
<value>用户使用协议与法律声明</value>
|
||||
<value>Пользовательское соглашение</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepCommonSetting" xml:space="preserve">
|
||||
<value>基础设置</value>
|
||||
<value>Основные настройки</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepCommonSettingHint" xml:space="preserve">
|
||||
<value>稍后可以在设置中修改</value>
|
||||
<value>Это можно изменить позже в настройках</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepDocument" xml:space="preserve">
|
||||
<value>Документация</value>
|
||||
@@ -1556,6 +1568,12 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>不能添加名称无效的计划</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此计划的养成物品与背包材料将会丢失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>确认要删除当前计划吗?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>实时便笺 Webhook Url 配置成功</value>
|
||||
</data>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>Настройки уведомлений</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知权限已被关闭</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>Обновить</value>
|
||||
</data>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>Обновить</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>未启用通知区域图标,关闭窗口后自动刷新将不会执行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>在我游玩原神时不通知我</value>
|
||||
</data>
|
||||
@@ -2544,7 +2568,7 @@
|
||||
<value>前往反馈</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingGachaLogHeader" xml:space="preserve">
|
||||
<value>祈愿记录</value>
|
||||
<value>История молитв</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingGameHeader" xml:space="preserve">
|
||||
<value>游戏</value>
|
||||
@@ -2580,7 +2604,7 @@
|
||||
<value>Заметки в реальном времени</value>
|
||||
</data>
|
||||
<data name="ViewpageSettingHomeCardItemgachaStatisticsHeader" xml:space="preserve">
|
||||
<value>祈愿记录</value>
|
||||
<value>История молитв</value>
|
||||
</data>
|
||||
<data name="ViewpageSettingHomeCardItemLaunchGameHeader" xml:space="preserve">
|
||||
<value>Game Launcher</value>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>快捷键</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知区域显示图标,以允许执行后台任务,重启后生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知区域图标</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>前往官网</value>
|
||||
</data>
|
||||
@@ -3006,7 +3036,7 @@
|
||||
<value>武器资料</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>Скопировано в буфер обмена</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>所有魔神任务已完成</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>Завершенно</value>
|
||||
</data>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{1}] исключение сетевого запроса в [{0}] пожалуйста, повторите попытку позже</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登录失败,请前往 HoYoLAB 初始化账号,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>显示器编号</value>
|
||||
</data>
|
||||
|
||||
3266
src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.vi.resx
Normal file
3266
src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.vi.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -163,7 +163,7 @@
|
||||
<value>清單</value>
|
||||
</data>
|
||||
<data name="CoreExceptionServiceDatabaseCorruptedMessage" xml:space="preserve">
|
||||
<value>資料庫已損壞:{0}</value>
|
||||
<value>數據庫已損壞:{0}</value>
|
||||
</data>
|
||||
<data name="CoreExceptionServiceUserdataCorruptedMessage" xml:space="preserve">
|
||||
<value>用户數據已損壞:{0}</value>
|
||||
@@ -172,10 +172,10 @@
|
||||
<value>請勿在系統管理員模式下使用此功能 {0}</value>
|
||||
</data>
|
||||
<data name="CoreIOPickerExtensionPickerExceptionInfoBarTitle" xml:space="preserve">
|
||||
<value>無法打開文件選擇器</value>
|
||||
<value>無法打開檔案選擇器</value>
|
||||
</data>
|
||||
<data name="CoreIOTempFileCreateFail" xml:space="preserve">
|
||||
<value>權限不足,創建臨時文件失敗</value>
|
||||
<value>權限不足,創建臨時檔案失敗</value>
|
||||
</data>
|
||||
<data name="CoreJumpListHelperLaunchGameItemDisplayName" xml:space="preserve">
|
||||
<value>啟動遊戲</value>
|
||||
@@ -192,6 +192,18 @@
|
||||
<data name="CoreWindowHotkeyCombinationRegisterFailed" xml:space="preserve">
|
||||
<value>[{0}] 鍵盤快速鍵 [{1}] 註冊失敗</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconExitLabel" xml:space="preserve">
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconLaunchGameLabel" xml:space="preserve">
|
||||
<value>啟動遊戲</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconPromotedHint" xml:space="preserve">
|
||||
<value>胡桃已進入後臺運行</value>
|
||||
</data>
|
||||
<data name="CoreWindowingNotifyIconViewLabel" xml:space="preserve">
|
||||
<value>窗口</value>
|
||||
</data>
|
||||
<data name="CoreWindowThemeDark" xml:space="preserve">
|
||||
<value>深色</value>
|
||||
</data>
|
||||
@@ -271,7 +283,7 @@
|
||||
<value>國際伺服器</value>
|
||||
</data>
|
||||
<data name="ModelBindingUserInitializationFailed" xml:space="preserve">
|
||||
<value>網路連線錯誤</value>
|
||||
<value>網絡異常</value>
|
||||
</data>
|
||||
<data name="ModelEntityDailyNoteNotRefreshed" xml:space="preserve">
|
||||
<value>尚未重新整理</value>
|
||||
@@ -340,7 +352,7 @@
|
||||
<value>蘿莉</value>
|
||||
</data>
|
||||
<data name="ModelIntrinsicBodyTypeMale" xml:space="preserve">
|
||||
<value>成年男子</value>
|
||||
<value>成男</value>
|
||||
</data>
|
||||
<data name="ModelIntrinsicElementNameElec" xml:space="preserve">
|
||||
<value>雷</value>
|
||||
@@ -409,7 +421,7 @@
|
||||
<comment>Need EXACT same string in game</comment>
|
||||
</data>
|
||||
<data name="ModelMetadataAvatarPlayerName" xml:space="preserve">
|
||||
<value>旅人</value>
|
||||
<value>旅行者</value>
|
||||
</data>
|
||||
<data name="ModelMetadataFetterInfoBirthdayFormat" xml:space="preserve">
|
||||
<value>{0} 月 {1} 日</value>
|
||||
@@ -540,7 +552,7 @@
|
||||
<value>精煉 {0} 階</value>
|
||||
</data>
|
||||
<data name="MustSelectUserAndUid" xml:space="preserve">
|
||||
<value>必须登入 米遊社/HoYoLAB 並選定一個用戶與角色</value>
|
||||
<value>必須登入 米游社/ HoYoLAB 並選擇一個用戶與角色</value>
|
||||
</data>
|
||||
<data name="ServerGachaLogServiceDeleteEntrySucceed" xml:space="preserve">
|
||||
<value>刪除了 UID:{0} 的 {1} 筆祈願記錄</value>
|
||||
@@ -573,25 +585,25 @@
|
||||
<value>新密碼設定成功</value>
|
||||
</data>
|
||||
<data name="ServerPassportServiceEmailHasNotRegistered" xml:space="preserve">
|
||||
<value>當前郵箱尚未註冊</value>
|
||||
<value>當前電子郵件地址尚未註冊</value>
|
||||
</data>
|
||||
<data name="ServerPassportServiceEmailHasRegistered" xml:space="preserve">
|
||||
<value>當前郵箱已被註冊</value>
|
||||
<value>當前電子郵件地址已被註冊</value>
|
||||
</data>
|
||||
<data name="ServerPassportServiceInternalException" xml:space="preserve">
|
||||
<value>註冊失敗,伺服器異常,請盡快聯繫開發者解決</value>
|
||||
</data>
|
||||
<data name="ServerPassportServiceUnregisterFailed" xml:space="preserve">
|
||||
<value>使用者不存在,刪除帳號失敗</value>
|
||||
<value>用戶不存在,刪除帳號失敗</value>
|
||||
</data>
|
||||
<data name="ServerPassportUnregisterSucceed" xml:space="preserve">
|
||||
<value>使用者刪除成功</value>
|
||||
<value>用戶刪除成功</value>
|
||||
</data>
|
||||
<data name="ServerPassportUserInfoNotExist" xml:space="preserve">
|
||||
<value>使用者不存在,獲取使用者信息失敗</value>
|
||||
<value>用戶不存在,獲取用戶信息失敗</value>
|
||||
</data>
|
||||
<data name="ServerPassportUserNameOrPasswordIncorrect" xml:space="preserve">
|
||||
<value>使用者名稱或密碼錯誤</value>
|
||||
<value>用戶名稱或密碼錯誤</value>
|
||||
</data>
|
||||
<data name="ServerPassportVerifyFailed" xml:space="preserve">
|
||||
<value>驗證失敗</value>
|
||||
@@ -600,10 +612,10 @@
|
||||
<value>驗證請求失敗,不是當前登入的帳號</value>
|
||||
</data>
|
||||
<data name="ServerPassportVerifyRequestSuccess" xml:space="preserve">
|
||||
<value>驗證碼已發送至郵箱</value>
|
||||
<value>驗證碼已發送至信箱</value>
|
||||
</data>
|
||||
<data name="ServerPassportVerifyRequestUserAlreadyExisted" xml:space="preserve">
|
||||
<value>驗證請求失敗,當前郵箱已被註冊</value>
|
||||
<value>驗證請求失敗,當前電子郵件地址已被註冊</value>
|
||||
</data>
|
||||
<data name="ServerPassportVerifyTooFrequent" xml:space="preserve">
|
||||
<value>驗證請求過快,請 1 分鐘後再試</value>
|
||||
@@ -639,7 +651,7 @@
|
||||
<value>上傳深淵記錄成功,但未登入胡桃通行證,無法獲贈祈願記錄上傳服務時長</value>
|
||||
</data>
|
||||
<data name="ServerRecordUploadSuccessButNoSuchUser" xml:space="preserve">
|
||||
<value>上傳深淵記錄成功,但無法找到使用者,無法獲贈祈願記錄上傳服務時長</value>
|
||||
<value>上傳深淵記錄成功,但無法找到用戶,無法獲贈祈願記錄上傳服務時長</value>
|
||||
</data>
|
||||
<data name="ServerRecordUploadSuccessButNotFirstTimeAtCurrentSchedule" xml:space="preserve">
|
||||
<value>上傳深淵記錄成功,但不是本期首次提交,無法獲贈祈願記錄上傳服務時長</value>
|
||||
@@ -651,7 +663,7 @@
|
||||
<value>UIAF Json 檔案</value>
|
||||
</data>
|
||||
<data name="ServiceAchievementUIAFImportPickerTitile" xml:space="preserve">
|
||||
<value>打開 UIAF Json 文件</value>
|
||||
<value>打開 UIAF Json 檔案</value>
|
||||
</data>
|
||||
<data name="ServiceAchievementUserdataCorruptedAchievementIdNotUnique" xml:space="preserve">
|
||||
<value>單個成就存檔內發現多個相同的成就 Id</value>
|
||||
@@ -771,10 +783,10 @@
|
||||
<value>養成計算:{0:MM-dd HH:mm}</value>
|
||||
</data>
|
||||
<data name="ServiceAvatarInfoSummaryGameRecordNotRefreshed" xml:space="preserve">
|
||||
<value>原神戰績:尚未重新整理</value>
|
||||
<value>戰績:尚未重新整理</value>
|
||||
</data>
|
||||
<data name="ServiceAvatarInfoSummaryGameRecordRefreshTimeFormat" xml:space="preserve">
|
||||
<value>原神戰績:{0:MM-dd HH:mm}</value>
|
||||
<value>戰績:{0:MM-dd HH:mm}</value>
|
||||
</data>
|
||||
<data name="ServiceAvatarInfoSummaryShowcaseNotRefreshed" xml:space="preserve">
|
||||
<value>角色櫥窗:尚未重新整理</value>
|
||||
@@ -843,7 +855,7 @@
|
||||
<value>目前原粹樹脂:{0}</value>
|
||||
</data>
|
||||
<data name="ServiceDailyNoteNotifierTitle" xml:space="preserve">
|
||||
<value>實時便箋提醒</value>
|
||||
<value>即時便箋提醒</value>
|
||||
</data>
|
||||
<data name="ServiceDailyNoteNotifierTransformer" xml:space="preserve">
|
||||
<value>參數質變儀</value>
|
||||
@@ -894,7 +906,7 @@
|
||||
<value>請求驗證密鑰失敗</value>
|
||||
</data>
|
||||
<data name="ServiceGachaLogUrlProviderCachePathInvalid" xml:space="preserve">
|
||||
<value>未正確提供原神路徑,或目前設置的路徑不正確</value>
|
||||
<value>未正確提供原神路徑,或目前設定的路徑不正確</value>
|
||||
</data>
|
||||
<data name="ServiceGachaLogUrlProviderCachePathNotFound" xml:space="preserve">
|
||||
<value>找不到原神內置瀏覽器緩存路徑:\n{0}</value>
|
||||
@@ -915,13 +927,13 @@
|
||||
<value>不支持的 Item Id:{0}</value>
|
||||
</data>
|
||||
<data name="ServiceGachaUIGFImportLanguageNotMatch" xml:space="preserve">
|
||||
<value>UIGF 文件的語言:{0} 與胡桃的語言:{1} 不對應,請切換到對應語言重試</value>
|
||||
<value>UIGF 檔案的語言:{0} 與胡桃的語言:{1} 不對應,請切換到對應語言重試</value>
|
||||
</data>
|
||||
<data name="ServiceGameDetectGameAccountMultiMatched" xml:space="preserve">
|
||||
<value>存在多個匹配賬號,請刪除重複的賬號</value>
|
||||
</data>
|
||||
<data name="ServiceGameEnsureGameResourceInsufficientDirectoryPermissions" xml:space="preserve">
|
||||
<value>文件系統權限不足,無法轉換伺服器</value>
|
||||
<value>檔案系統權限不足,無法轉換伺服器</value>
|
||||
</data>
|
||||
<data name="ServiceGameEnsureGameResourceQueryResourceInformation" xml:space="preserve">
|
||||
<value>下載遊戲資源索引</value>
|
||||
@@ -969,10 +981,10 @@
|
||||
<value>遊戲本體</value>
|
||||
</data>
|
||||
<data name="ServiceGameLocatorUnityLogFileNotFound" xml:space="preserve">
|
||||
<value>找不到 Unity 日誌文件</value>
|
||||
<value>找不到 Unity 日誌檔案</value>
|
||||
</data>
|
||||
<data name="ServiceGameLocatorUnityLogGamePathNotFound" xml:space="preserve">
|
||||
<value>在 Unity 日誌文件中無法找到遊戲路徑</value>
|
||||
<value>在 Unity 日誌檔案中無法找到遊戲路徑</value>
|
||||
</data>
|
||||
<data name="ServiceGamePackageConvertMoveFileBackupFormat" xml:space="preserve">
|
||||
<value>備份:{0}</value>
|
||||
@@ -984,7 +996,7 @@
|
||||
<value>替換:{0}</value>
|
||||
</data>
|
||||
<data name="ServiceGamePackageRenameDataFolderFailed" xml:space="preserve">
|
||||
<value>重新命名資料文件夾名稱失敗</value>
|
||||
<value>重新命名資料檔案夾名稱失敗</value>
|
||||
</data>
|
||||
<data name="ServiceGamePackageRequestPackageVerion" xml:space="preserve">
|
||||
<value>正在獲取 Package Version</value>
|
||||
@@ -993,7 +1005,7 @@
|
||||
<value>獲取 Package Version 失敗</value>
|
||||
</data>
|
||||
<data name="ServiceGamePackageRequestScatteredFileFailed" xml:space="preserve">
|
||||
<value>下載客戶端文件失敗:{0}</value>
|
||||
<value>下載客戶端檔案失敗:{0}</value>
|
||||
</data>
|
||||
<data name="ServiceGamePathLocateFailed" xml:space="preserve">
|
||||
<value>無法找到遊戲本體路徑,請前往設定修改</value>
|
||||
@@ -1005,7 +1017,7 @@
|
||||
<value>無法讀取遊戲設定檔 {0},可能是檔案不存在</value>
|
||||
</data>
|
||||
<data name="ServiceGameSetMultiChannelUnauthorizedAccess" xml:space="preserve">
|
||||
<value>無法讀取或儲存配置文件,請用系統管理員模式重試</value>
|
||||
<value>無法讀取或儲存配置檔案,請用系統管理員模式重試</value>
|
||||
</data>
|
||||
<data name="ServiceGameUnlockerFindModuleNoModuleFound" xml:space="preserve">
|
||||
<value>在尋找必要的模組時遇到問題:無法讀取任何模組,可能是保護驅動已經載入完成,請重試</value>
|
||||
@@ -1026,19 +1038,19 @@
|
||||
<value>祈願紀錄上傳服務有效期至\n{0:yyyy.MM.dd HH:mm:ss}</value>
|
||||
</data>
|
||||
<data name="ServiceMetadataFileNotFound" xml:space="preserve">
|
||||
<value>無法找到暫存的元數據文件</value>
|
||||
<value>無法找到暫存的元數據檔案</value>
|
||||
</data>
|
||||
<data name="ServiceMetadataHttpRequestFailed" xml:space="preserve">
|
||||
<value>HTTP {0} | Error:{1}:元資料校驗文件下載失敗</value>
|
||||
<value>HTTP {0} | Error:{1}:元資料校驗檔案下載失敗</value>
|
||||
</data>
|
||||
<data name="ServiceMetadataNotInitialized" xml:space="preserve">
|
||||
<value>元數據服務未初始化或初始化失敗</value>
|
||||
</data>
|
||||
<data name="ServiceMetadataParseFailed" xml:space="preserve">
|
||||
<value>元數據文件解析失敗</value>
|
||||
<value>元數據校驗檔案解析失敗</value>
|
||||
</data>
|
||||
<data name="ServiceMetadataRequestFailed" xml:space="preserve">
|
||||
<value>元數據文件下載失敗</value>
|
||||
<value>元數據校驗檔案下載失敗</value>
|
||||
</data>
|
||||
<data name="ServiceMetadataVersionNotSupported" xml:space="preserve">
|
||||
<value>你的胡桃版本過低,請盡快升級</value>
|
||||
@@ -1053,7 +1065,7 @@
|
||||
<value>獲取獎勵清單失敗</value>
|
||||
</data>
|
||||
<data name="ServiceSignInRiskVerificationFailed" xml:space="preserve">
|
||||
<value>驗證失敗,請前往HoYoLAB原神簽到頁面自行領取獎勵</value>
|
||||
<value>驗證失敗,請前往 HoYoLAB 原神簽到頁面自行領取獎勵</value>
|
||||
</data>
|
||||
<data name="ServiceSignInSuccessRewardFormat" xml:space="preserve">
|
||||
<value>簽到成功,{0}×{1}</value>
|
||||
@@ -1065,7 +1077,7 @@
|
||||
<value>發現新版本 {0}</value>
|
||||
</data>
|
||||
<data name="ServiceUserCurrentMultiMatched" xml:space="preserve">
|
||||
<value>已选中多条用户记录</value>
|
||||
<value>多個用戶記錄為選中狀態</value>
|
||||
</data>
|
||||
<data name="ServiceUserCurrentUpdateAndSaveFailed" xml:space="preserve">
|
||||
<value>用戶 {0} 狀態儲存失敗</value>
|
||||
@@ -1167,7 +1179,7 @@
|
||||
<value>在此處輸入</value>
|
||||
</data>
|
||||
<data name="ViewDialogAchievementArchiveCreateTitle" xml:space="preserve">
|
||||
<value>設置成就存檔的名稱</value>
|
||||
<value>設定成就存檔的名稱</value>
|
||||
</data>
|
||||
<data name="ViewDialogAchievementArchiveImportStrategy" xml:space="preserve">
|
||||
<value>匯入模式</value>
|
||||
@@ -1230,7 +1242,7 @@
|
||||
<value>在主頁顯示卡片</value>
|
||||
</data>
|
||||
<data name="ViewDialogDailyNoteNotificationTitle" xml:space="preserve">
|
||||
<value>實時便箋通知設置</value>
|
||||
<value>即時便箋通知設定</value>
|
||||
</data>
|
||||
<data name="ViewDialogDailyNoteNotificationTransformerNotify" xml:space="preserve">
|
||||
<value>參數質變儀提醒</value>
|
||||
@@ -1335,10 +1347,10 @@
|
||||
<value>為帳號命名</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGameConfigurationFixDialogHint" xml:space="preserve">
|
||||
<value>請選擇當前遊戲路徑對應的遊戲服務器</value>
|
||||
<value>請選擇當前遊戲路徑對應的遊戲伺服器</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGameConfigurationFixDialogTitle" xml:space="preserve">
|
||||
<value>正在修複配置文件</value>
|
||||
<value>正在修複配置檔案</value>
|
||||
</data>
|
||||
<data name="ViewDialogLaunchGamePackageConvertHint" xml:space="preserve">
|
||||
<value>轉換可能需要花費一段時間,請勿關閉胡桃</value>
|
||||
@@ -1347,7 +1359,7 @@
|
||||
<value>正在轉換客戶端</value>
|
||||
</data>
|
||||
<data name="ViewDialogQRCodeTitle" xml:space="preserve">
|
||||
<value>使用米遊社掃描 QR 碼</value>
|
||||
<value>使用米游社掃描 QR 碼</value>
|
||||
</data>
|
||||
<data name="ViewDialogReconfirmTextHeader" xml:space="preserve">
|
||||
<value>為防止你在無意間啟用,請輸入正在啟用的功能開關的<b>標題名稱</b></value>
|
||||
@@ -1362,19 +1374,19 @@
|
||||
<value>是否永久刪除用戶數據</value>
|
||||
</data>
|
||||
<data name="ViewDialogSpiralAbyssUploadRecordHomaNotLoginCloseButtonText" xml:space="preserve">
|
||||
<value>前往登录</value>
|
||||
<value>前往登入畫面</value>
|
||||
</data>
|
||||
<data name="ViewDialogSpiralAbyssUploadRecordHomaNotLoginHint" xml:space="preserve">
|
||||
<value>当前未登录胡桃账号,上传深渊数据无法获赠胡桃云时长</value>
|
||||
<value>當前未登入胡桃賬號,上傳深淵數據無法獲贈胡桃雲時長</value>
|
||||
</data>
|
||||
<data name="ViewDialogSpiralAbyssUploadRecordHomaNotLoginPrimaryButtonText" xml:space="preserve">
|
||||
<value>继续上传</value>
|
||||
<value>繼續上傳</value>
|
||||
</data>
|
||||
<data name="ViewDialogSpiralAbyssUploadRecordHomaNotLoginTitle" xml:space="preserve">
|
||||
<value>上传深渊数据</value>
|
||||
<value>Загрузите данные о Бездне</value>
|
||||
</data>
|
||||
<data name="ViewDialogUpdatePackageDownloadUpdatelogLinkContent" xml:space="preserve">
|
||||
<value>查看更新日志</value>
|
||||
<value>查看更新日誌</value>
|
||||
</data>
|
||||
<data name="ViewDialogUserDocumentAction" xml:space="preserve">
|
||||
<value>立即前往</value>
|
||||
@@ -1416,10 +1428,10 @@
|
||||
<value>用戶使用協議與法律聲明</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepCommonSetting" xml:space="preserve">
|
||||
<value>基礎設置</value>
|
||||
<value>基礎設定</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepCommonSettingHint" xml:space="preserve">
|
||||
<value>稍後可以在設置中修改</value>
|
||||
<value>稍後可以在設定中修改</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepDocument" xml:space="preserve">
|
||||
<value>文檔</value>
|
||||
@@ -1449,10 +1461,10 @@
|
||||
<value>資源</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepStaticResourceSetting" xml:space="preserve">
|
||||
<value>圖像資源設置</value>
|
||||
<value>圖像資源設定</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepStaticResourceSettingHint" xml:space="preserve">
|
||||
<value>* 除非你卸載並重新安裝胡桃,否則你將無法更改這些設置</value>
|
||||
<value>* 除非你卸載並重新安裝胡桃,否則你將無法更改這些設定</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepStaticResourceSettingMinimumHeader" xml:space="preserve">
|
||||
<value>圖片資源包體</value>
|
||||
@@ -1556,11 +1568,17 @@
|
||||
<data name="ViewModelCultivationProjectInvalidName" xml:space="preserve">
|
||||
<value>不能新增名稱無效的計劃</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectContent" xml:space="preserve">
|
||||
<value>此操作不可逆,此計劃的養成物品與背包材料將會丟失</value>
|
||||
</data>
|
||||
<data name="ViewModelCultivationRemoveProjectTitle" xml:space="preserve">
|
||||
<value>確定要刪除當前計劃嗎?</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteConfigWebhookUrlComplete" xml:space="preserve">
|
||||
<value>即時便箋 Webhook URL 配置成功</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteHoyolabVerificationUnsupported" xml:space="preserve">
|
||||
<value>HoYoLAB 賬號不支持驗證實时便箋</value>
|
||||
<value>HoYoLAB 賬號不支持驗證即時便箋</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteModifyTaskFail" xml:space="preserve">
|
||||
<value>修改計劃任務失敗</value>
|
||||
@@ -1581,7 +1599,7 @@
|
||||
<value>8 分鐘 | 1 樹脂</value>
|
||||
</data>
|
||||
<data name="ViewModelDailyNoteRequestProgressTitle" xml:space="preserve">
|
||||
<value>正在獲取實時便箋信息,請稍候</value>
|
||||
<value>正在獲取即時便箋信息,請稍候</value>
|
||||
</data>
|
||||
<data name="ViewModelExportSuccessMessage" xml:space="preserve">
|
||||
<value>成功儲存至指定位置</value>
|
||||
@@ -1590,13 +1608,13 @@
|
||||
<value>匯出成功</value>
|
||||
</data>
|
||||
<data name="ViewModelExportWarningMessage" xml:space="preserve">
|
||||
<value>寫入文件時遇到問題</value>
|
||||
<value>寫入檔案時遇到問題</value>
|
||||
</data>
|
||||
<data name="ViewModelExportWarningTitle" xml:space="preserve">
|
||||
<value>匯出失敗</value>
|
||||
</data>
|
||||
<data name="ViewModelGachaLogExportFileType" xml:space="preserve">
|
||||
<value>UIFG JSON 文件</value>
|
||||
<value>UIFG JSON 檔案</value>
|
||||
</data>
|
||||
<data name="ViewModelGachaLogImportComplete" xml:space="preserve">
|
||||
<value>匯入完成</value>
|
||||
@@ -1653,7 +1671,7 @@
|
||||
<value>下一步</value>
|
||||
</data>
|
||||
<data name="ViewModelGuideActionStaticResourceBegin" xml:space="preserve">
|
||||
<value>下載資源文件中,請稍候</value>
|
||||
<value>下載資源檔案中,請稍候</value>
|
||||
</data>
|
||||
<data name="ViewModelGuideStaticResourceQualityHigh" xml:space="preserve">
|
||||
<value>高品質</value>
|
||||
@@ -1662,7 +1680,7 @@
|
||||
<value>原圖</value>
|
||||
</data>
|
||||
<data name="ViewModelHutaoPassportEmailNotValidHint" xml:space="preserve">
|
||||
<value>請輸入正確的郵箱</value>
|
||||
<value>請輸入正確的電子郵件地址</value>
|
||||
</data>
|
||||
<data name="ViewModelImportFromClipboardErrorTitle" xml:space="preserve">
|
||||
<value>剪貼板中的文本格式不正塙</value>
|
||||
@@ -1680,7 +1698,7 @@
|
||||
<value>切換伺服器失敗</value>
|
||||
</data>
|
||||
<data name="ViewModelLaunchGameFixConfigurationFileButtonText" xml:space="preserve">
|
||||
<value>修複配置文件</value>
|
||||
<value>修複配置檔案</value>
|
||||
</data>
|
||||
<data name="ViewModelLaunchGameFixConfigurationFileSuccess" xml:space="preserve">
|
||||
<value>修複完成</value>
|
||||
@@ -1710,7 +1728,7 @@
|
||||
<value>操作完成</value>
|
||||
</data>
|
||||
<data name="ViewModelSettingClearWebCacheFail" xml:space="preserve">
|
||||
<value>清除失敗,文件目錄權限不足,請使用系統管理員模式重試</value>
|
||||
<value>清除失敗,檔案目錄權限不足,請使用系統管理員模式重試</value>
|
||||
</data>
|
||||
<data name="ViewModelSettingClearWebCachePathInvalid" xml:space="preserve">
|
||||
<value>清除失敗,找不到目錄:{0}</value>
|
||||
@@ -1737,7 +1755,7 @@
|
||||
<value>無感驗證復合 URL 配置成功</value>
|
||||
</data>
|
||||
<data name="ViewModelSettingResetStaticResourceProgress" xml:space="preserve">
|
||||
<value>正在重置图片资源</value>
|
||||
<value>正在重設圖片資源</value>
|
||||
</data>
|
||||
<data name="ViewModelSettingSetDataFolderSuccess" xml:space="preserve">
|
||||
<value>設置數據目錄成功,重新啟動以應用更改</value>
|
||||
@@ -1782,7 +1800,7 @@
|
||||
<value>待處理</value>
|
||||
</data>
|
||||
<data name="ViewModelWelcomeDownloadSummaryException" xml:space="preserve">
|
||||
<value>文件下載異常</value>
|
||||
<value>檔案下載異常</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementAddArchive" xml:space="preserve">
|
||||
<value>建立新存檔</value>
|
||||
@@ -1797,7 +1815,7 @@
|
||||
<value>從剪貼簿匯入</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementImportFromFile" xml:space="preserve">
|
||||
<value>從 UIAF 文件匯入</value>
|
||||
<value>從 UIAF 檔案匯入</value>
|
||||
</data>
|
||||
<data name="ViewPageAchievementImportLabel" xml:space="preserve">
|
||||
<value>匯入</value>
|
||||
@@ -1860,7 +1878,7 @@
|
||||
<value>同步角色天賦信息</value>
|
||||
</data>
|
||||
<data name="ViewPageAvatarPropertyRefreshFromHoyolabGameRecord" xml:space="preserve">
|
||||
<value>從米遊社原神戰績同步</value>
|
||||
<value>從 HoYoLAB 戰績同步</value>
|
||||
</data>
|
||||
<data name="ViewPageAvatarPropertyRefreshFromHoyolabGameRecordDescription" xml:space="preserve">
|
||||
<value>同步角色天賦外的大部分信息</value>
|
||||
@@ -1946,6 +1964,9 @@
|
||||
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
|
||||
<value>通知設定</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
|
||||
<value>胡桃的通知權限已被關閉</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
|
||||
<value>立即重新整理</value>
|
||||
</data>
|
||||
@@ -1968,7 +1989,7 @@
|
||||
<value>自動重新整理</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingAutoRefreshDescription" xml:space="preserve">
|
||||
<value>間隔選定的時間後重新整理添加的實時便箋</value>
|
||||
<value>間隔選定的時間後重新整理添加的即時便箋</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshElevatedHint" xml:space="preserve">
|
||||
<value>這些選項僅允許在非系統管理員模式下更改</value>
|
||||
@@ -1976,6 +1997,9 @@
|
||||
<data name="ViewPageDailyNoteSettingRefreshHeader" xml:space="preserve">
|
||||
<value>重新整理</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSettingRefreshNotifyIconDisabledHint" xml:space="preserve">
|
||||
<value>為啟用通知區域圖標,關閉窗口後自動重新整理將不會執行</value>
|
||||
</data>
|
||||
<data name="ViewPageDailyNoteSlientModeDescription" xml:space="preserve">
|
||||
<value>在我游玩原神時不通知我</value>
|
||||
</data>
|
||||
@@ -2079,7 +2103,7 @@
|
||||
<value>輸入</value>
|
||||
</data>
|
||||
<data name="ViewPageGachaLogRecoverFromHutaoCloudDescription" xml:space="preserve">
|
||||
<value>從胡桃云恢復祈願紀錄</value>
|
||||
<value>從胡桃雲恢復祈願紀錄</value>
|
||||
</data>
|
||||
<data name="ViewPageGachaLogRefresh" xml:space="preserve">
|
||||
<value>重新整理</value>
|
||||
@@ -2229,7 +2253,7 @@
|
||||
<value>刪除帳號的數據將永遠丢失,無法恢復</value>
|
||||
</data>
|
||||
<data name="ViewPageHutaoPassportUserNameHint" xml:space="preserve">
|
||||
<value>請輸入電郵地址</value>
|
||||
<value>請輸入電子郵件地址</value>
|
||||
</data>
|
||||
<data name="ViewPageHutaoPassportVerifyCodeAction" xml:space="preserve">
|
||||
<value>取得驗證碼</value>
|
||||
@@ -2367,7 +2391,7 @@
|
||||
<value>綁定當前用戶的角色</value>
|
||||
</data>
|
||||
<data name="ViewPageLaunchGameSwitchAccountDescription" xml:space="preserve">
|
||||
<value>在游戲内切換賬號,網絡環境發生變化后需要重新手動檢測</value>
|
||||
<value>在游戲内切換賬號,網絡環境發生變化後需要重新手動檢測</value>
|
||||
</data>
|
||||
<data name="ViewPageLaunchGameSwitchAccountDetectAction" xml:space="preserve">
|
||||
<value>檢測</value>
|
||||
@@ -2382,7 +2406,7 @@
|
||||
<value>重新命名</value>
|
||||
</data>
|
||||
<data name="ViewPageLaunchGameSwitchSchemeDescription" xml:space="preserve">
|
||||
<value>切換遊戲伺服器(陸服/渠道服/國際服)</value>
|
||||
<value>切換遊戲伺服器(大陸伺服器/渠道伺服器/國際伺服器)</value>
|
||||
</data>
|
||||
<data name="ViewPageLaunchGameSwitchSchemeHeader" xml:space="preserve">
|
||||
<value>伺服器</value>
|
||||
@@ -2412,7 +2436,7 @@
|
||||
<value>請輸入您的 HoYoLAB UID</value>
|
||||
</data>
|
||||
<data name="ViewPageLoginMihoyoUserDescription" xml:space="preserve">
|
||||
<value>你正在通過由我們提供的內嵌網頁視圖登錄 米哈遊通行證,我們會在你點擊 我已登錄 按鈕後,讀取你的 Cookie 信息,由此視圖髪起的網絡通信只髪生於你的計算機與米哈遊服務器之間</value>
|
||||
<value>你正在通過由我們提供的內嵌網頁視圖登入 miHoYo 通行證賬號,我們會在你點擊 我已登入 按鈕後,讀取你的 Cookie 信息,由此視圖發起的網絡通信只發生於你的計算機與 miHoYo 服務器之間</value>
|
||||
</data>
|
||||
<data name="ViewPageLoginMihoyoUserLoggedInAction" xml:space="preserve">
|
||||
<value>我已登入</value>
|
||||
@@ -2421,7 +2445,7 @@
|
||||
<value>在下方登入 miHoYo 通行證賬號</value>
|
||||
</data>
|
||||
<data name="ViewPageOpenScreenshotFolderAction" xml:space="preserve">
|
||||
<value>開啟截圖資料夾</value>
|
||||
<value>開啟截圖檔案夾</value>
|
||||
</data>
|
||||
<data name="ViewPageResetGamePathAction" xml:space="preserve">
|
||||
<value>選定遊戲路徑</value>
|
||||
@@ -2460,7 +2484,7 @@
|
||||
<value>圖片暫存存放在此</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingCacheFolderHeader" xml:space="preserve">
|
||||
<value>暫存檔案夾</value>
|
||||
<value>暫存 檔案夾</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingCardHutaoPassportHeader" xml:space="preserve">
|
||||
<value>胡桃通行證</value>
|
||||
@@ -2490,7 +2514,7 @@
|
||||
<value>用戶數據/元數據 存放在此</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingDataFolderHeader" xml:space="preserve">
|
||||
<value>資料檔案夾</value>
|
||||
<value>資料 檔案夾</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingDeleteCacheAction" xml:space="preserve">
|
||||
<value>刪除</value>
|
||||
@@ -2577,7 +2601,7 @@
|
||||
<value>成就管理</value>
|
||||
</data>
|
||||
<data name="ViewpageSettingHomeCardItemDailyNoteHeader" xml:space="preserve">
|
||||
<value>實時便籤</value>
|
||||
<value>即時便籤</value>
|
||||
</data>
|
||||
<data name="ViewpageSettingHomeCardItemgachaStatisticsHeader" xml:space="preserve">
|
||||
<value>祈願紀錄</value>
|
||||
@@ -2640,7 +2664,7 @@
|
||||
<value>刪除帳號</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingIsAdvancedLaunchOptionsEnabledDescription" xml:space="preserve">
|
||||
<value>在完整閱讀原神和胡桃工具箱使用者協定後,我選擇啟用「啟動遊戲 - 進階功能」</value>
|
||||
<value>在完整閱讀原神和胡桃工具箱用戶協定後,我選擇啟用「啟動遊戲 - 進階功能」</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingIsAdvancedLaunchOptionsEnabledHeader" xml:space="preserve">
|
||||
<value>進階功能</value>
|
||||
@@ -2654,6 +2678,12 @@
|
||||
<data name="ViewPageSettingKeyShortcutHeader" xml:space="preserve">
|
||||
<value>快速鍵</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconDescription" xml:space="preserve">
|
||||
<value>在通知區域顯示圖標,以允許執行後臺任務,重新啟動後生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingNotifyIconHeader" xml:space="preserve">
|
||||
<value>通知區域圖標</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOfficialSiteNavigate" xml:space="preserve">
|
||||
<value>前往官網</value>
|
||||
</data>
|
||||
@@ -2661,7 +2691,7 @@
|
||||
<value>自定義背景圖片,支援 bmp / gif / ico / jpg / jpeg / png / tiff / webp 格式</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingOpenBackgroundImageFolderHeader" xml:space="preserve">
|
||||
<value>打開背景圖片資料夾</value>
|
||||
<value>打開背景圖片檔案夾</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingResetAction" xml:space="preserve">
|
||||
<value>重設</value>
|
||||
@@ -2691,7 +2721,7 @@
|
||||
<value>遊戲路徑</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingSetGamePathHint" xml:space="preserve">
|
||||
<value>設置遊戲路徑時,請選擇遊戲本體(YuanShen.exe 或 GenshinImpact.exe) 而不是啟動器(launcher.exe)</value>
|
||||
<value>設定遊戲路徑時,請選擇遊戲本體(YuanShen.exe 或 GenshinImpact.exe) 而不是啟動器(launcher.exe)</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingShellExperienceHeader" xml:space="preserve">
|
||||
<value>Shell 體驗</value>
|
||||
@@ -2895,7 +2925,7 @@
|
||||
<value>出戰次數</value>
|
||||
</data>
|
||||
<data name="ViewSpiralAbyssStatistics" xml:space="preserve">
|
||||
<value>統計數據</value>
|
||||
<value>統計資料</value>
|
||||
</data>
|
||||
<data name="ViewSpiralAbyssTakeDamage" xml:space="preserve">
|
||||
<value>最多承傷</value>
|
||||
@@ -2907,7 +2937,7 @@
|
||||
<value>上傳資料</value>
|
||||
</data>
|
||||
<data name="ViewTitileUpdatePackageDownloadContent" xml:space="preserve">
|
||||
<value>是否立即下载?</value>
|
||||
<value>是否立即下載?</value>
|
||||
</data>
|
||||
<data name="ViewTitileUpdatePackageDownloadFailedMessage" xml:space="preserve">
|
||||
<value>下載更新失敗</value>
|
||||
@@ -3006,19 +3036,19 @@
|
||||
<value>武器資料</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?(\d\.\d)版本更新(?:完成|)后永久开放</value>
|
||||
<value>(?:(?:〓活動時間〓|〓任務開放時間〓).*?(\d\.\d)版本更新(?:完成|)|&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;)後永久開放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?(\d\.\d)版本期间持续开放</value>
|
||||
<value>〓活動時間〓.*?(\d\.\d)版本期間持續開放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchTransientActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|祈愿时间|【上架时间】|〓折扣时间〓).*?(\d\.\d)版本更新后.*?~.*?&lt;t class="t_(?:gl|lc)".*?&gt;(.*?)&lt;/t&gt;</value>
|
||||
<value>(?:〓活動時間〓|祈願時間|【上架時間】|〓折扣時間〓).*?(\d\.\d)版本更新後.*?~.*?&lt;t class="t_(?:gl|lc)".*?&gt;(.*?)&lt;/t&gt;</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchVersionUpdatePreviewTime" xml:space="preserve">
|
||||
<value>将于&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;进行版本更新维护</value>
|
||||
<value>將於&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;進行版本更新維護</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchVersionUpdatePreviewTitle" xml:space="preserve">
|
||||
<value>\d\.\d版本更新维护预告</value>
|
||||
<value>\d\.\d版本更新停服說明</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchVersionUpdateTime" xml:space="preserve">
|
||||
<value>〓更新時間〓.+?&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;</value>
|
||||
@@ -3044,6 +3074,9 @@
|
||||
<data name="WebBridgeShareCopyToClipboardSuccess" xml:space="preserve">
|
||||
<value>已複製到剪貼簿</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestChapterFinished" xml:space="preserve">
|
||||
<value>所有魔神任務已完成</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteArchonQuestStatusFinished" xml:space="preserve">
|
||||
<value>全部完成</value>
|
||||
</data>
|
||||
@@ -3141,7 +3174,7 @@
|
||||
<value>{0} 秒</value>
|
||||
</data>
|
||||
<data name="WebDailyNoteVerificationFailed" xml:space="preserve">
|
||||
<value>驗證失敗,請手動進行驗證或前往「米遊社-旅行工具-原神戰績-實時便箋」頁面查看。</value>
|
||||
<value>驗證失敗,請手動進行驗證或前往「 HoYoLAB -工具箱-戰績-即時便箋」頁面查看。</value>
|
||||
</data>
|
||||
<data name="WebEnkaResponseStatusCode400" xml:space="preserve">
|
||||
<value>錯誤的 UID 格式</value>
|
||||
@@ -3192,10 +3225,10 @@
|
||||
<value>無效的 UID</value>
|
||||
</data>
|
||||
<data name="WebHoyolabRegionCNGF01" xml:space="preserve">
|
||||
<value>陸服 官方服</value>
|
||||
<value>大陸伺服器 官方伺服器</value>
|
||||
</data>
|
||||
<data name="WebHoyolabRegionCNQD01" xml:space="preserve">
|
||||
<value>陸服 渠道服</value>
|
||||
<value>大陸伺服器 渠道伺服器</value>
|
||||
</data>
|
||||
<data name="WebHoyolabRegionOSASIA" xml:space="preserve">
|
||||
<value>國際服 亞服</value>
|
||||
@@ -3213,7 +3246,7 @@
|
||||
<value>胡桃服務維護中</value>
|
||||
</data>
|
||||
<data name="WebIndexOrSpiralAbyssVerificationFailed" xml:space="preserve">
|
||||
<value>驗證失敗,請手動進行驗證或前往「米遊社-旅行工具-原神戰績」頁面查看。</value>
|
||||
<value>驗證失敗,請手動進行驗證或前往「 HoYoLAB -工具箱-戰績」頁面查看。</value>
|
||||
</data>
|
||||
<data name="WebResponseFormat" xml:space="preserve">
|
||||
<value>狀態:{0} | 信息:{1}</value>
|
||||
@@ -3224,6 +3257,9 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{0}] 中的 [{1}] 網路請求異常,請稍後再試</value>
|
||||
</data>
|
||||
<data name="WebResponseSignInErrorHint" xml:space="preserve">
|
||||
<value>登入失敗,請前往 HoYoLAB 初始化賬號,原始消息:{0}</value>
|
||||
</data>
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>顯示器編號</value>
|
||||
</data>
|
||||
|
||||
@@ -152,6 +152,8 @@ internal sealed partial class AnnouncementService : IAnnouncementService
|
||||
announcement.StartTime = versionStartTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
announcement.StartTime = UnsafeDateTimeOffset.ParseDateTime(permanent.Groups[2].ValueSpan, offset);
|
||||
}
|
||||
|
||||
if (AnnouncementRegex.PersistentActivityAfterUpdateTimeRegex.Match(announcement.Content) is { Success: true } persistent)
|
||||
|
||||
@@ -32,7 +32,7 @@ internal sealed partial class AvatarInfoDbBulkOperation
|
||||
|
||||
public async ValueTask<List<EntityAvatarInfo>> UpdateDbAvatarInfosByShowcaseAsync(string uid, IEnumerable<EnkaAvatarInfo> webInfos, CancellationToken token)
|
||||
{
|
||||
List<EntityAvatarInfo> dbInfos = await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid).ConfigureAwait(false);
|
||||
List<EntityAvatarInfo> dbInfos = await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid, token).ConfigureAwait(false);
|
||||
EnsureItemsAvatarIdUnique(ref dbInfos, uid, out Dictionary<AvatarId, EntityAvatarInfo> dbInfoMap);
|
||||
|
||||
using (IServiceScope scope = serviceProvider.CreateScope())
|
||||
@@ -50,14 +50,14 @@ internal sealed partial class AvatarInfoDbBulkOperation
|
||||
AddOrUpdateAvatarInfo(entity, uid, appDbContext, webInfo);
|
||||
}
|
||||
|
||||
return await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid).ConfigureAwait(false);
|
||||
return await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid, token).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
public async ValueTask<List<EntityAvatarInfo>> UpdateDbAvatarInfosByGameRecordCharacterAsync(UserAndUid userAndUid, CancellationToken token)
|
||||
{
|
||||
string uid = userAndUid.Uid.Value;
|
||||
List<EntityAvatarInfo> dbInfos = await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid).ConfigureAwait(false);
|
||||
List<EntityAvatarInfo> dbInfos = await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid, token).ConfigureAwait(false);
|
||||
EnsureItemsAvatarIdUnique(ref dbInfos, uid, out Dictionary<AvatarId, EntityAvatarInfo> dbInfoMap);
|
||||
|
||||
using (IServiceScope scope = serviceProvider.CreateScope())
|
||||
@@ -103,14 +103,14 @@ internal sealed partial class AvatarInfoDbBulkOperation
|
||||
}
|
||||
|
||||
Return:
|
||||
return await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid).ConfigureAwait(false);
|
||||
return await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid, token).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async ValueTask<List<EntityAvatarInfo>> UpdateDbAvatarInfosByCalculateAvatarDetailAsync(UserAndUid userAndUid, CancellationToken token)
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
string uid = userAndUid.Uid.Value;
|
||||
List<EntityAvatarInfo> dbInfos = await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid).ConfigureAwait(false);
|
||||
List<EntityAvatarInfo> dbInfos = await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid, token).ConfigureAwait(false);
|
||||
EnsureItemsAvatarIdUnique(ref dbInfos, uid, out Dictionary<AvatarId, EntityAvatarInfo> dbInfoMap);
|
||||
|
||||
using (IServiceScope scope = serviceProvider.CreateScope())
|
||||
@@ -146,7 +146,7 @@ internal sealed partial class AvatarInfoDbBulkOperation
|
||||
}
|
||||
}
|
||||
|
||||
return await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid).ConfigureAwait(false);
|
||||
return await avatarInfoDbService.GetAvatarInfoListByUidAsync(uid, token).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -32,6 +32,7 @@ internal static class AvatarViewBuilderExtension
|
||||
return builder;
|
||||
}
|
||||
|
||||
[SuppressMessage("", "SH002")]
|
||||
public static TBuilder SetCalculatorRefreshTimeFormat<TBuilder>(this TBuilder builder, DateTimeOffset refreshTime, Func<object?, string> format, string defaultValue)
|
||||
where TBuilder : IAvatarViewBuilder
|
||||
{
|
||||
@@ -116,6 +117,7 @@ internal static class AvatarViewBuilderExtension
|
||||
return builder.Configure(b => b.View.FetterLevel = level);
|
||||
}
|
||||
|
||||
[SuppressMessage("", "SH002")]
|
||||
public static TBuilder SetGameRecordRefreshTimeFormat<TBuilder>(this TBuilder builder, DateTimeOffset refreshTime, Func<object?, string> format, string defaultValue)
|
||||
where TBuilder : IAvatarViewBuilder
|
||||
{
|
||||
@@ -128,6 +130,7 @@ internal static class AvatarViewBuilderExtension
|
||||
return builder.Configure(b => b.View.GameRecordRefreshTimeFormat = gameRecordRefreshTimeFormat);
|
||||
}
|
||||
|
||||
[SuppressMessage("", "SH002")]
|
||||
public static TBuilder SetId<TBuilder>(this TBuilder builder, AvatarId id)
|
||||
where TBuilder : IAvatarViewBuilder
|
||||
{
|
||||
@@ -175,6 +178,7 @@ internal static class AvatarViewBuilderExtension
|
||||
return builder.Configure(b => b.View.Reliquaries = reliquaries);
|
||||
}
|
||||
|
||||
[SuppressMessage("", "SH002")]
|
||||
public static TBuilder SetShowcaseRefreshTimeFormat<TBuilder>(this TBuilder builder, DateTimeOffset refreshTime, Func<object?, string> format, string defaultValue)
|
||||
where TBuilder : IAvatarViewBuilder
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user