XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

HaloPixelToolBox

【WinUI3】基于USB HID通讯的花再音响工具箱

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/HaloPixelToolBox

添加配置文件初始化

2fd8379
XFE工作室室长 <mail@xfegzs.com>
提交于

代码差异

1 个文件 +9 -2
Modified Server/HaloPixelToolBox.Server/Program.cs +9 -2
@@ -6,7 +6,7 @@ using XFEExtension.NetCore.ServerInteractive.Interfaces;
6 6 using XFEExtension.NetCore.ServerInteractive.Utilities.Extensions;
7 7 using XFEExtension.NetCore.ServerInteractive.Utilities.Server;
8 8
9 var bindingAddress = Environment.GetEnvironmentVariable("HALOPIXEL_SERVER_BINDING_URL") ?? ServerProfile.ServerBindingIpAddress;
9 SaveProfiles();
10 10
11 11 var server = XFEServerBuilder.CreateBuilder()
12 12 .UseXFEServer()
@@ -30,8 +30,15 @@ var server = XFEServerBuilder.CreateBuilder()
30 30 {
31 31 options.ServerCoreName = "HaloPixelToolBoxServer";
32 32 options.MainEntryPoint = "api";
33 options.BindIP(bindingAddress);
33 options.BindIP(ServerProfile.ServerBindingIpAddress);
34 34 }))
35 35 .Build();
36 36
37 37 await server.Start();
38
39 void SaveProfiles()
40 {
41 ServerProfile.SaveProfile();
42 UserDataProfile.SaveProfile();
43 MainDataProfile.SaveProfile();
44 }