初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器 HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块 Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚 AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace PCL.Core.Utils.OS;
|
||||
|
||||
public static class AumidHelper
|
||||
{
|
||||
public const string Aumid = "PCLCommunity.PCLCE";
|
||||
|
||||
public static bool HasAumid()
|
||||
{
|
||||
using var key = Registry.CurrentUser.OpenSubKey(string.Concat(@"Software\Classes\AppUserModelId\", Aumid));
|
||||
return key is not null;
|
||||
}
|
||||
|
||||
public static void RegisterAumid()
|
||||
{
|
||||
// .NET 8 在正常情况下不可能返回 null,如果炸了不应该包住而是让他炸下去
|
||||
using var key = Registry.CurrentUser.CreateSubKey(string.Concat(@"Software\Classes\AppUserModelId\", Aumid));
|
||||
key.SetValue("DisplayName", "Plain Craft Launcher Community Edition");
|
||||
key.SetValue("IconUri", IconHelper.GetIconPath());
|
||||
key.SetValue("IconBackgroundColor", "FFDDDD");
|
||||
}
|
||||
|
||||
public static void UnregisterAumid()
|
||||
{
|
||||
Registry.CurrentUser.DeleteSubKey(string.Concat(@"Software\Classes\AppUserModelId\", Aumid), false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user