返回提交历史
Modified
HaloPixelToolBox/HaloPixelToolBox.Core/Utilities/CloudLyricsReader.cs
+2
-0
Modified
HaloPixelToolBox/HaloPixelToolBox/HaloPixelToolBox.csproj
+1
-1
Modified
HaloPixelToolBox/HaloPixelToolBox/ViewModels/CloudMusicLyricsToolPageViewModel.cs
+3
-0
Modified
HaloPixelToolBox/HaloPixelToolBox/Views/CloudMusicLyricsToolPage.xaml
+2
-0
XFEstudio/HaloPixelToolBox
支持最新版网易云歌词
ba3ab7a
代码差异
4 个文件
+8
-1
@@ -8,6 +8,7 @@ namespace HaloPixelToolBox.Core.Utilities;
8
8
public class CloudMusicLyricsReader
9
9
{
10
10
public nint Address { get; set; }
11
public FileVersionInfo? VersionInfo { get; set; }
11
12
public MemoryEditor Editor { get; set; } = new();
12
13
13
14
public bool Initialize()
@@ -16,6 +17,7 @@ public class CloudMusicLyricsReader
16
17
{
17
18
Console.WriteLine($"[DEBUG]已找到进程:{process.ProcessName}({process.Id}|{process.Id:X}) - {process.MainWindowTitle}");
18
19
Editor.CurrentProcess = process;
20
VersionInfo = FileVersionInfo.GetVersionInfo(process.MainModule?.FileName ?? string.Empty);
19
21
return ReresolveAddress();
20
22
}
21
23
else
@@ -9,7 +9,7 @@
9
9
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10
10
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
11
11
<UseWinUI>true</UseWinUI>
12
<Version>1.1.1</Version>
12
<Version>1.1.2</Version>
13
13
<EnableMsixTooling>true</EnableMsixTooling>
14
14
<WindowsPackageType>None</WindowsPackageType>
15
15
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
@@ -21,6 +21,8 @@ public partial class CloudMusicLyricsToolPageViewModel : ServiceBaseViewModelBas
21
21
private bool switchBackWhenPause = CloudMusicLyricsProfile.SwitchBackWhenPause;
22
22
[ObservableProperty]
23
23
private int switchBackTimeout = CloudMusicLyricsProfile.SwitchBackTimeout;
24
[ObservableProperty]
25
private string cloudMusicVersion = string.Empty;
24
26
public HaloPixelDevice Device { get; set; } = new();
25
27
public CloudMusicLyricsReader Reader { get; set; } = new();
26
28
@@ -59,6 +61,7 @@ public partial class CloudMusicLyricsToolPageViewModel : ServiceBaseViewModelBas
59
61
AutoNavigationParameterService.CurrentPage?.DispatcherQueue.TryEnqueue(() =>
60
62
{
61
63
CloudMusicReady = ready;
64
CloudMusicVersion = ready && Reader.VersionInfo != null ? $"{Reader.VersionInfo}" : "未检测到云音乐";
62
65
});
63
66
await Task.Delay(500);
64
67
}
@@ -42,6 +42,8 @@
42
42
<Border CornerRadius="90" Height="25" Width="25" Visibility="{x:Bind ViewModel.CloudMusicReady, Mode=OneWay}" Background="{ThemeResource SystemFillColorSuccessBrush}"/>
43
43
</Grid>
44
44
</Grid>
45
<TextBlock Text="网易云版本 (当前支持版本3.1.25)" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
46
<TextBlock Text="{x:Bind ViewModel.CloudMusicVersion, Mode=OneWay}" Style="{StaticResource BodyTextBlockStyle}"/>
45
47
<TextBlock Text="启用状态" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
46
48
<controls:SettingsCard Header="启用歌词同步" Description="启用后,网易云的歌词会实时显示在花再 Halo Pixel 音响上">
47
49
<ToggleSwitch IsOn="{x:Bind ViewModel.EnableCloudMusicLyrics, Mode=TwoWay}"/>