This commit is contained in:
Lightczx
2023-11-06 17:07:35 +08:00
parent 9eed633e05
commit 416c6f15a6
2 changed files with 13 additions and 5 deletions

View File

@@ -48,9 +48,9 @@
Height="38.4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding CopyPathCommand}"
Content="{StaticResource FontIconContentOpenInNewWindow}"
FontFamily="{StaticResource SymbolThemeFontFamily}"
NavigateUri="{Binding Path}"/>
FontFamily="{StaticResource SymbolThemeFontFamily}"/>
</Grid>
</DataTemplate>
</Expander.Resources>
@@ -92,9 +92,9 @@
Height="38.4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding CopyPathCommand}"
Content="{StaticResource FontIconContentOpenInNewWindow}"
FontFamily="{StaticResource SymbolThemeFontFamily}"
NavigateUri="{Binding Path}"/>
FontFamily="{StaticResource SymbolThemeFontFamily}"/>
<MenuFlyoutSeparator Grid.Row="2" Margin="4,16,4,0"/>
<ItemsControl
Grid.Row="3"

View File

@@ -1,13 +1,15 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
using Snap.Hutao.Core.IO.DataTransfer;
namespace Snap.Hutao.Web.Hoyolab.SdkStatic.Hk4e.Launcher;
/// <summary>
/// 下载的文件
/// </summary>
[HighQuality]
internal class PathMd5
internal partial class PathMd5
{
/// <summary>
/// 下载地址
@@ -25,4 +27,10 @@ internal class PathMd5
/// 显示名称
/// </summary>
public string DisplayName { get => System.IO.Path.GetFileName(Path); }
[Command("CopyPathCommand")]
private void CopyPathToClipboard()
{
Ioc.Default.GetRequiredService<IClipboardInterop>().SetText(Path);
}
}