返回提交历史
Modified
HaloPixelToolBox/HaloPixelToolBox.Core/Utilities/HaloPixelDevice.cs
+1
-3
Modified
HaloPixelToolBox/HaloPixelToolBox.Core/Utilities/HidPacketBuilder.cs
+2
-0
Modified
HaloPixelToolBox/HaloPixelToolBox/App.xaml.cs
+1
-1
Modified
HaloPixelToolBox/HaloPixelToolBox/HaloPixelToolBox.csproj
+4
-4
Modified
HaloPixelToolBox/HaloPixelToolBox/ViewModels/CloudMusicLyricsToolPageViewModel.cs
+1
-1
XFEstudio/HaloPixelToolBox
更新XFEConsole日志 修复文字超出长度不显示的问题
62b22e5
代码差异
5 个文件
+9
-9
@@ -34,10 +34,8 @@ public partial class HaloPixelDevice
34
34
public void ShowText(string text)
35
35
{
36
36
using var stream = CurrentDevice?.Open();
37
byte[] package = new byte[64];
38
37
var data = HidPacketBuilder.BuildText(text);
39
Array.Copy(data, package, data.Length);
40
stream?.Write(package);
38
stream?.Write(data);
41
39
stream?.Close();
42
40
}
43
41
@@ -31,6 +31,8 @@ public class HidPacketBuilder
31
31
/// </summary>
32
32
public static byte[] BuildText(string text)
33
33
{
34
if (text.Length > 50)
35
text = text.Substring(0, 50);
34
36
var textBytes = Encoding.UTF8.GetBytes(text);
35
37
byte textLen = (byte)textBytes.Length;
36
38
// 有效载荷长度 = TextLen(1) + Text(N) + Checksum(1)
@@ -25,6 +25,7 @@ namespace HaloPixelToolBox
25
25
public App()
26
26
{
27
27
XFEConsole.UseXFEConsoleLog();
28
XFEConsole.Log.LogPath = Path.Combine(AppPath.LogDictionary, XFEConsole.Log.LogPath);
28
29
Console.WriteLine("正在初始化应用程序...");
29
30
this.InitializeComponent();
30
31
Console.WriteLine("应用程序初始化完成");
@@ -71,7 +72,6 @@ namespace HaloPixelToolBox
71
72
File.Delete(log);
72
73
}
73
74
}
74
XFEConsole.Log.Export().WriteIn($@"{AppPath.LogDictionary}\{DateTime.Now:yyyy-M-d_HH-mm-ss}.log");
75
75
Console.WriteLine("日志保存成功");
76
76
Current.Exit();
77
77
}
@@ -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.2</Version>
12
<Version>1.1.3</Version>
13
13
<EnableMsixTooling>true</EnableMsixTooling>
14
14
<WindowsPackageType>None</WindowsPackageType>
15
15
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
@@ -53,14 +53,14 @@
53
53
</ItemGroup>
54
54
<ItemGroup>
55
55
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.*" />
56
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.*" />
56
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.251106002" />
57
57
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
58
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.250402" />
58
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.251219" />
59
59
<PackageReference Include="XFEExtension.NetCore" Version="3.3.*" />
60
60
<PackageReference Include="XFEExtension.NetCore.AutoConfig" Version="2.0.*" />
61
61
<PackageReference Include="XFEExtension.NetCore.UpgradeHelper" Version="1.0.1" />
62
62
<PackageReference Include="XFEExtension.NetCore.WinUIHelper" Version="1.2.*" />
63
<PackageReference Include="XFEExtension.NetCore.XFEConsole" Version="1.1.2" />
63
<PackageReference Include="XFEExtension.NetCore.XFEConsole" Version="1.2.1" />
64
64
</ItemGroup>
65
65
<ItemGroup>
66
66
<ProjectReference Include="..\HaloPixelToolBox.Core\HaloPixelToolBox.Core.csproj" />
@@ -96,6 +96,7 @@ public partial class CloudMusicLyricsToolPageViewModel : ServiceBaseViewModelBas
96
96
break;
97
97
if (Reader.TryReadLyrics(out var lyrics) && lastRead != lyrics)
98
98
{
99
Console.WriteLine($"已读取到歌词:{lyrics}");
99
100
lastRead = lyrics;
100
101
isClockUI = false;
101
102
time = 0;
@@ -114,7 +115,6 @@ public partial class CloudMusicLyricsToolPageViewModel : ServiceBaseViewModelBas
114
115
await Task.Delay(500);
115
116
Device.SetTextLayout(Core.Models.HaloPixelTextLayout.ScrollRightToLeft);
116
117
}
117
Console.WriteLine($"已读取到歌词:{lyrics}");
118
118
}
119
119
await Task.Delay(50);
120
120
time += 50;