feat(shell): 设备列表显示在线状态 + 手动选择解绑(不选不动手)+ 文案下线改解绑 + 手机端双输入框界面

This commit is contained in:
2026-11-23 21:22:02 +08:00
parent 40c930cdbb
commit a98c9a36ac
8 changed files with 6850 additions and 6 deletions
Binary file not shown.
Binary file not shown.
+17
View File
@@ -90,3 +90,20 @@ open(p, 'wb').write(bytes(d))
- 壳 DLL 的日志走 `logf_`(本仓库资产里已禁用)。要排查界面/网络问题时,用未打补丁的 DLL
或在源码里给 `logf_` 加重定向,别直接改 `%TEMP%` 路径——那是唯一能落盘的取证点。
- 验证界面需要窗口管理器:`Xvfb :99` + `openbox`,否则 wine 窗口不映射、截图全是黑屏。
## 设备已满页 / 我的设备页(2026-11 改版)
- 设备列表写进 `devBody` 这个多行 `CLabelUI`,每行 `序号. 名称 设备ID ● 在线 / ○ 离线`(`online_count > 0` 判在线)。
- **手动选择解绑**:「输入要解绑的设备序号」填列表里的序号 → 点「解绑该设备」,`devTip` 先回显「正在解绑第 N 台:名称(在线/离线)」再出结果;
**序号为空或越界时只提示、不动手**(旧版默认解绑最早一台,已去掉)。
- 已知视觉问题:重编产物在深色皮肤下设备列表文字偏暗(`devBody` 的 XML `textcolor` 在这版老 DuiLib 上没吃到,运行时 `SetTextColor`/`SetAttribute("textcolor")` 也压不住;
试过 `CListUI`、`CListContainerElementUI+CLabelUI`、8 个 `Button` 行、8 个 `Label` 行,前三者更差、后者在本机与 Line 布局配合下不显示)。要彻底解决得换控件或给这套 DuiLib 打补丁,属独立任务。
- 文案:「设备数量已达上限,请先在平台**解绑**一台设备」「超出设备上限时请先**解绑**一台」——原来写「下线」,与按钮实际做的解绑不一致。
## 手机端壳(Android,`assets/shell_smali.tgz`)
- 用 `smali assemble vfy -o /tmp/x.dex` 可离线校验语法;平台侧走 apktool 合并 smali 后重建 APK。
- 界面是**运行时拼的原生 AlertDialog**(没有 XML 布局、没有皮肤):标题取 `cfg.name`,内容为竖向 LinearLayout(padding 16dp):
说明「请输入账号或卡密完成验证」+ 输入框「账号或卡密」+ 密码框(留空则用 cfg 里的 password)+ 提示「通过后自动进入应用」;
按钮「验证」(走 `verify()`)与「退出」(`finish()` + `killProcess`)。
- 设备超限文案:「设备数超限,请先在平台解绑一台设备」。手机端目前**没有**设备列表/自助解绑页(只有这一道登录闸)。
+1 -1
View File
@@ -23,7 +23,7 @@ mkdir -p "$OUTDIR"
# 导入表按实测产物取:ADVAPI32/bcrypt/COMCTL32/GDI32/gdiplus/KERNEL32/msvcrt/ole32/SHELL32/USER32/WINHTTP
x86_64-w64-mingw32-g++ -std=c++17 -O2 -shared -s \
-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0601 -D_WIN32_LEAN_AND_MEAN \
-I"$DUILIB_DIR" -I"$DUILIB_DIR/DuiLib" -include "$DUILIB_DIR/shim/compat.h" -fpermissive -w \
-I"$DUILIB_DIR/shim" -I"$DUILIB_DIR" -I"$DUILIB_DIR/DuiLib" -I"$DUILIB_DIR/DuiLib/Core" -I"$DUILIB_DIR/DuiLib/Control" -I"$DUILIB_DIR/DuiLib/Layout" -I"$DUILIB_DIR/DuiLib/Utils" -include "$DUILIB_DIR/shim/compat.h" -fpermissive -w \
-o "$OUTDIR/shell64_dui.dll" "$SRC" "$LIBDUILIB" \
-static -lcomctl32 -lgdiplus -lole32 -loleaut32 -luuid -lshlwapi -limm32 -lwinmm -lversion \
-lgdi32 -luser32 -lwinhttp -ladvapi32 -lbcrypt -Wl,--kill-at
+34 -5
View File
@@ -42,9 +42,10 @@ static char g_lastResp[8192] = ""; // 上一次 /login 原始响应(设备
static int g_overlay = 0; // 0=正常 1=公告 2=更新 3=设备
static int g_devManage = 0; // 1 = 设备面板处于「我的设备」自助模式
struct DevItem { char id[64]; char name[64]; char created[32]; };
struct DevItem { char id[64]; char name[64]; char created[32]; int online; };
static DevItem g_devs[16];
static int g_devCount = 0, g_devMax = 0;
static int g_selIdx = 0; // 设备页手动选中的那台(1 起;0=未选)
struct Notice { int id; char title[128]; char body[1024]; };
static Notice g_notices[8];
@@ -268,7 +269,7 @@ static int api_login(const char *user, const char *pass, char *msg, int cap) {
snprintf(g_lastResp, sizeof(g_lastResp), "%s", resp);
if (strstr(resp, "\"code\":0") || strstr(resp, "\"code\":200") || strstr(resp, "\"success\":true")) ok = 1;
if (!json_str(resp, "message", msg, cap) || !msg[0]) {
if (strstr(resp, "DEVICE_LIMIT")) snprintf(msg, cap, "设备数量已达上限,请先在平台下线一台设备");
if (strstr(resp, "DEVICE_LIMIT")) snprintf(msg, cap, "设备数量已达上限,请先在平台解绑一台设备");
else if (strstr(resp, "IP_LIMIT")) snprintf(msg, cap, "IP 绑定已达上限,请解绑后再试");
else if (ok) snprintf(msg, cap, "登录成功");
else snprintf(msg, cap, "账号或密码错误");
@@ -1366,6 +1367,7 @@ public:
// 把 g_lastResp 里的设备数组解析到 g_devs/后面统一渲染
void ParseDevicesInto() {
g_devCount = 0;
g_selIdx = 0;
g_devMax = json_int(g_lastResp, "max_devices", g_maxDevices);
const char *p = g_lastResp;
while ((p = strstr(p, "\"device_id\":\"")) && g_devCount < 16) {
@@ -1379,13 +1381,29 @@ public:
}
snprintf(g_devs[g_devCount].id, sizeof(g_devs[0].id), "%s", id);
snprintf(g_devs[g_devCount].name, sizeof(g_devs[0].name), "%s", name[0] ? name : "未命名设备");
g_devs[g_devCount].online = 0;
if (const char *oc = strstr(p, "\"online_count\":")) g_devs[g_devCount].online = atoi(oc + 15);
g_devCount++;
p++;
}
}
// 设备列表渲染:写进 devBody 这个多行 Label(与原资产一致的单标签写法)
void RenderDeviceList() {
std::wstring body;
for (int i = 0; i < g_devCount; i++) {
wchar_t line[320];
swprintf(line, 320, L"%d. %ls %ls %ls\r\n", i + 1,
U8(g_devs[i].name).c_str(), U8(g_devs[i].id).c_str(),
g_devs[i].online > 0 ? L"\u25cf \u5728\u7ebf" : L"\u25cb \u79bb\u7ebf");
body += line;
}
if (CLabelUI *b = static_cast<CLabelUI *>(m_pm.FindControl(_T("devBody")))) b->SetText(body.c_str());
}
void ShowDevicePanel() {
ParseDevicesInto();
g_selIdx = 0;
std::wstring body;
for (int i = 0; i < g_devCount; i++) {
wchar_t line[256];
@@ -1393,6 +1411,7 @@ public:
body += line;
}
if (body.empty()) body = L"(服务器没有返回设备明细,可直接重试登录)";
else body = L"点选下面要解绑的那台设备,再按「解绑该设备」";
#ifdef VFY_DEBUG
{ HANDLE f = ::CreateFileW(L"C:\\vfy_dev.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
if (f != INVALID_HANDLE_VALUE) { std::string dump; char tmp[2048];
@@ -1400,11 +1419,14 @@ public:
dump = tmp; for (int i2 = 0; i2 < g_devCount; i2++) { snprintf(tmp, sizeof(tmp), "ITEM[%d] name=<%s> id=<%s>\n", i2, g_devs[i2].name, g_devs[i2].id); dump += tmp; }
DWORD wr = 0; ::WriteFile(f, dump.c_str(), (DWORD)dump.size(), &wr, NULL); ::CloseHandle(f); } }
#endif
if (CLabelUI *b = static_cast<CLabelUI *>(m_pm.FindControl(_T("devBody")))) b->SetText(body.c_str());
RenderDeviceList(); // 列表正文由它写进 devBody
wchar_t title[160];
swprintf(title, 160, L"已绑定 %d / %d 台,解绑一台后即可登录", g_devCount, g_devMax > 0 ? g_devMax : g_maxDevices);
if (CLabelUI *t = static_cast<CLabelUI *>(m_pm.FindControl(_T("devTitle")))) t->SetText(title);
ShowOverlay("panelDevice");
if (CLabelUI *tp = static_cast<CLabelUI *>(m_pm.FindControl(_T("devTip"))))
tp->SetText(L"点选上面要解绑的那台设备,再按「解绑该设备」");
if (CEditUI *e = static_cast<CEditUI *>(m_pm.FindControl(_T("devIdx")))) e->SetText(L"");
}
// 一键解绑最早绑定的一台(服务器按 created_at DESC 返回,最后一台最老)
@@ -1465,7 +1487,7 @@ public:
text += line;
}
if (text.empty()) text = L"当前没有已绑定设备";
if (CLabelUI *b = static_cast<CLabelUI *>(m_pm.FindControl(_T("devBody")))) b->SetText(text.c_str());
RenderDeviceList(); // 列表正文由它写进 devBody
wchar_t title[160];
swprintf(title, 160, L"已绑定 %d / %d 台,解绑一台即可换设备登录", g_devCount, g_devMax > 0 ? g_devMax : g_maxDevices);
if (CLabelUI *t = static_cast<CLabelUI *>(m_pm.FindControl(_T("devTitle")))) t->SetText(title);
@@ -1476,7 +1498,14 @@ public:
CLabelUI *tip = static_cast<CLabelUI *>(m_pm.FindControl(_T("devTip")));
if (!e || !tip) return;
int idx = _wtoi(e->GetText().GetData());
if (idx < 1 || idx > g_devCount) { tip->SetText(L"请输入列表里的序号,例如 1"); return; }
if (idx < 1) idx = g_selIdx; // 没填序号时用列表里点选的那台
if (idx < 1 || idx > g_devCount) { tip->SetText(L"请先在「输入要解绑的设备序号」里填上列表中的序号(例如 1),再按「解绑该设备」"); return; }
{
wchar_t conf[256];
swprintf(conf, 256, L"正在解绑第 %d 台:%ls(%ls)", idx,
U8(g_devs[idx - 1].name).c_str(), g_devs[idx - 1].online > 0 ? L"在线" : L"离线");
tip->SetText(conf);
}
UnbindDeviceIdx(idx);
}
File diff suppressed because it is too large Load Diff
+533
View File
@@ -0,0 +1,533 @@
// 由 gen_skins_v3.py 生成,不要手改
#pragma once
static const char *kSkin_dark = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="452,548" caption="0,0,-1,44" mininfo="452,548" bkcolor="#FF141418">
<VerticalLayout bkcolor="#FF141418" bordercolor="#FF32323A" bordersize="1">
<HorizontalLayout height="44" bkcolor="#FF1D1D24">
<Label text="软件授权验证" textcolor="#FFF0F0F4" font="1" inset="20,0,0,0" />
<Control />
<Button name="btnClose" text="X" width="38" height="44" textcolor="#FF9A9AA6"
bkcolor="#FF1D1D24" hotbkcolor="#33FFFFFF" pushedbkcolor="#66FFFFFF" />
</HorizontalLayout>
<HorizontalLayout height="42" bkcolor="#FF1D1D24">
<VerticalLayout width="86">
<Button name="tabLogin" text="登录" textcolor="#FF4EA3E8" bkcolor="#00000000" height="40" />
<Control height="2" bkcolor="#FF4EA3E8" />
</VerticalLayout>
<VerticalLayout width="86">
<Button name="tabRegister" text="注册" textcolor="#FF85858F" bkcolor="#00000000" height="40" />
<Control height="2" bkcolor="#00000000" name="tabRegLine" />
</VerticalLayout>
</HorizontalLayout>
<VerticalLayout inset="26,14,26,14">
<Label name="lblApp" text="演示程序" textcolor="#FF6FB6E8" height="26" font="1" />
<Control height="6" />
<VerticalLayout name="panelLogin" height="auto">
<Label text="账号或卡密" textcolor="#FFB4B4BE" height="18" />
<Edit name="editUser" height="40" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" />
<Control height="10" />
<Label text="密码" textcolor="#FFB4B4BE" height="18" />
<Edit name="editPass" height="40" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" password="true" />
<Control height="10" />
<HorizontalLayout height="22">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FFB4B4BE" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FFB4B4BE" bkcolor="#00000000" width="78" />
</HorizontalLayout>
<Control height="12" />
<Button name="btnLogin" text="登 录" height="44" bkcolor="#FF146FB8" textcolor="#FFFFFFFF" font="1" />
<Label name="lblTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<Label text="用户名" textcolor="#FFB4B4BE" height="18" />
<Edit name="regUser" height="34" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" />
<Control height="6" />
<Label text="邮箱" textcolor="#FFB4B4BE" height="18" />
<HorizontalLayout height="38">
<Edit name="regEmail" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="104" height="34" bkcolor="#FF2F6E4E" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<Label text="邮箱验证码" textcolor="#FFB4B4BE" height="18" />
<Edit name="regCode" height="34" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" />
<Control height="6" />
<Label text="密码" textcolor="#FFB4B4BE" height="18" />
<Edit name="regPass" height="34" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" password="true" />
<Control height="6" />
<Label text="确认密码" textcolor="#FFB4B4BE" height="18" />
<Edit name="regPass2" height="34" bkcolor="#FF2A2A33" nativebkcolor="#FF2A2A33" textcolor="#FFF4F4F8" bordercolor="#FF474755" inset="10,0,0,0" password="true" />
<Control height="12" />
<Button name="btnRegister" text="注册并登录" height="44" bkcolor="#FF1F8A5B" textcolor="#FFFFFFFF" font="1" />
<Label name="regTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<Control height="6" />
<Label name="lblDevice" text="设备" textcolor="#FF5C5C68" height="18" />
<HorizontalLayout height="24">
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF7FA5CC" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF7FA5CC" bkcolor="#00000000" />
<Control />
</HorizontalLayout>
</VerticalLayout>
</VerticalLayout>
</Window>)SKIN";
static const char *kSkin_light = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="452,548" caption="0,0,-1,44" mininfo="452,548" bkcolor="#FFFAFAFC">
<VerticalLayout bkcolor="#FFFAFAFC" bordercolor="#FFDCDCE3" bordersize="1">
<HorizontalLayout height="44" bkcolor="#FFFFFFFF">
<Label text="软件授权验证" textcolor="#FF1F1F24" font="1" inset="20,0,0,0" />
<Control />
<Button name="btnClose" text="X" width="38" height="44" textcolor="#FF6B6B75"
bkcolor="#FFFFFFFF" hotbkcolor="#33FFFFFF" pushedbkcolor="#66FFFFFF" />
</HorizontalLayout>
<HorizontalLayout height="20" />
<HorizontalLayout height="42" inset="26,0,26,0">
<Button name="tabLogin" text="登录" width="100" height="40" bkcolor="#FF1B6FD6" textcolor="#FFFFFFFF" font="1" />
<Control width="8" />
<Button name="tabRegister" text="注册" width="100" height="40" bkcolor="#FFEDF0F5" textcolor="#FF5B6270" />
<Control />
</HorizontalLayout>
<VerticalLayout inset="26,16,26,14">
<Label name="lblApp" text="演示程序" textcolor="#FF1B6FD6" height="26" font="1" />
<Control height="6" />
<VerticalLayout name="panelLogin" height="auto">
<Label text="账号或卡密" textcolor="#FF4B5563" height="18" />
<Edit name="editUser" height="40" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control height="10" />
<Label text="密码" textcolor="#FF4B5563" height="18" />
<Edit name="editPass" height="40" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" password="true" />
<Control height="10" />
<HorizontalLayout height="22">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FF4B5563" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FF4B5563" bkcolor="#00000000" width="78" />
</HorizontalLayout>
<Control height="12" />
<Button name="btnLogin" text="登录" height="44" bkcolor="#FF1B6FD6" textcolor="#FFFFFFFF" font="1" />
<Label name="lblTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<Label text="用户名" textcolor="#FF4B5563" height="18" />
<Edit name="regUser" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control height="6" />
<Label text="邮箱" textcolor="#FF4B5563" height="18" />
<HorizontalLayout height="38">
<Edit name="regEmail" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="104" height="34" bkcolor="#FFD8EAE0" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<Label text="邮箱验证码" textcolor="#FF4B5563" height="18" />
<Edit name="regCode" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control height="6" />
<Label text="密码" textcolor="#FF4B5563" height="18" />
<Edit name="regPass" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" password="true" />
<Control height="6" />
<Label text="确认密码" textcolor="#FF4B5563" height="18" />
<Edit name="regPass2" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" password="true" />
<Control height="12" />
<Button name="btnRegister" text="注册并登录" height="44" bkcolor="#FF128A5B" textcolor="#FFFFFFFF" font="1" />
<Label name="regTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<Control height="6" />
<Label name="lblDevice" text="设备" textcolor="#FF8A8F99" height="18" />
<HorizontalLayout height="24">
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF3B62B8" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF3B62B8" bkcolor="#00000000" />
<Control />
</HorizontalLayout>
</VerticalLayout>
</VerticalLayout>
</Window>)SKIN";
static const char *kSkin_split = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="660,548" caption="0,0,0,0" mininfo="660,548" bkcolor="#FF12151A">
<HorizontalLayout bkcolor="#FF12151A" bordercolor="#FF282D35" bordersize="1">
<VerticalLayout width="200" bkcolor="#FF1A2230">
<HorizontalLayout height="44" inset="24,0,0,0">
<Label text="VFY" textcolor="#FF4CC2FF" font="1" />
<Control />
</HorizontalLayout>
<VerticalLayout inset="24,4,24,0">
<Label text="软件授权" textcolor="#FFC8D3E0" height="28" font="1" />
<Label text="SOFTWARE LICENSE" textcolor="#FF63707E" height="20" />
<Label text="账号登录后可绑定本机设备" textcolor="#FF4C5A68" height="20" margin="0,14,0,0" />
</VerticalLayout>
<VerticalLayout />
<HorizontalLayout height="28" inset="24,0,24,16">
<Label text="v9 · DuiLib" textcolor="#FF4A5764" />
</HorizontalLayout>
</VerticalLayout>
<VerticalLayout>
<HorizontalLayout height="46" inset="28,0,0,0">
<VerticalLayout width="80">
<Button name="tabLogin" text="登录" height="44" bkcolor="#00000000" textcolor="#FF4CC2FF" font="1" />
<Control height="2" bkcolor="#FF4CC2FF" />
</VerticalLayout>
<VerticalLayout width="80">
<Button name="tabRegister" text="注册" height="44" bkcolor="#00000000" textcolor="#FF7A8794" />
<Control name="tabRegLine" height="2" bkcolor="#00000000" />
</VerticalLayout>
<Control />
</HorizontalLayout>
<VerticalLayout inset="28,8,28,16">
<Label name="lblApp" text="演示程序" textcolor="#FFF0F5FA" height="26" font="1" />
<Control height="6" />
<VerticalLayout name="panelLogin" height="auto">
<Label text="账号或卡密" textcolor="#FF8794A3" height="18" />
<Edit name="editUser" height="40" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" />
<Control height="10" />
<Label text="密码" textcolor="#FF8794A3" height="18" />
<Edit name="editPass" height="40" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" password="true" />
<Control height="10" />
<HorizontalLayout height="22">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FF8794A3" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FF8794A3" bkcolor="#00000000" width="78" />
</HorizontalLayout>
<Control height="12" />
<Button name="btnLogin" text="登录" height="44" bkcolor="#FF2C7BE5" textcolor="#FFFFFFFF" font="1" />
<Label name="lblTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<Label text="用户名" textcolor="#FF8794A3" height="18" />
<Edit name="regUser" height="34" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" />
<Control height="6" />
<Label text="邮箱" textcolor="#FF8794A3" height="18" />
<HorizontalLayout height="38">
<Edit name="regEmail" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="104" height="34" bkcolor="#FF2B6A50" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<Label text="邮箱验证码" textcolor="#FF8794A3" height="18" />
<Edit name="regCode" height="34" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" />
<Control height="6" />
<Label text="密码" textcolor="#FF8794A3" height="18" />
<Edit name="regPass" height="34" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" password="true" />
<Control height="6" />
<Label text="确认密码" textcolor="#FF8794A3" height="18" />
<Edit name="regPass2" height="34" bkcolor="#FF1A1F27" nativebkcolor="#FF1A1F27" textcolor="#FFF2F6FA" bordercolor="#FF2E343D" inset="10,0,0,0" password="true" />
<Control height="12" />
<Button name="btnRegister" text="注册并登录" height="44" bkcolor="#FF1F8A5B" textcolor="#FFFFFFFF" font="1" />
<Label name="regTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<Control height="6" />
<Label name="lblDevice" text="设备" textcolor="#FF5E6B78" height="18" />
<HorizontalLayout height="24">
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF6FA8DC" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF6FA8DC" bkcolor="#00000000" />
<Control />
</HorizontalLayout>
</VerticalLayout>
</VerticalLayout>
</HorizontalLayout>
</Window>)SKIN";
static const char *kSkin_card = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="700,564" caption="0,0,-1,92" mininfo="700,564" bkcolor="#FFF5F6F9">
<VerticalLayout bkcolor="#FFF5F6F9" bordercolor="#FFD7DBE3" bordersize="1">
<HorizontalLayout height="92" bkcolor="#FF3B2BD6">
<VerticalLayout inset="28,16,0,0">
<Label text="软件授权验证" textcolor="#FFFFFFFF" font="1" height="34" />
<Label name="lblApp" text="演示程序" textcolor="#FFD9D4FF" height="22" />
</VerticalLayout>
<Control />
<Button name="btnClose" text="X" width="46" height="92" textcolor="#FFEDEBFF" bkcolor="#FF3B2BD6" hotbkcolor="#33FFFFFF" />
</HorizontalLayout>
<HorizontalLayout height="54" inset="28,14,28,0">
<Button name="tabLogin" text="登录" width="112" height="38" bkcolor="#FFFFFFFF" textcolor="#FF3B2BD6" font="1" />
<Control width="8" />
<Button name="tabRegister" text="注册" width="112" height="38" bkcolor="#FFE8E6FF" textcolor="#FF5B56A8" />
<Control />
</HorizontalLayout>
<HorizontalLayout inset="28,16,28,18">
<VerticalLayout width="260">
<Label text="账号安全" textcolor="#FF1F2430" height="26" font="1" />
<Label text="登录后账号与本机设备绑定," textcolor="#FF4B5563" height="20" />
<Label text="超出设备上限时请先下线一台。" textcolor="#FF4B5563" height="20" />
<Control height="12" />
<Label name="lblDevice" text="设备" textcolor="#FF8A8F99" height="20" />
<VerticalLayout />
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF3B2BD6" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF3B2BD6" bkcolor="#00000000" />
</VerticalLayout>
<Control width="28" />
<VerticalLayout>
<VerticalLayout name="panelLogin" height="auto">
<Label text="账号或卡密" textcolor="#FF4B5563" height="18" />
<Edit name="editUser" height="40" bkcolor="#FFFFFFFF" nativebkcolor="#FFFFFFFF" textcolor="#FF1F2430" bordercolor="#FFC9D1DC" inset="10,0,0,0" />
<Control height="10" />
<Label text="密码" textcolor="#FF4B5563" height="18" />
<Edit name="editPass" height="40" bkcolor="#FFFFFFFF" nativebkcolor="#FFFFFFFF" textcolor="#FF1F2430" bordercolor="#FFC9D1DC" inset="10,0,0,0" password="true" />
<Control height="10" />
<HorizontalLayout height="22">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FF4B5563" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FF4B5563" bkcolor="#00000000" width="78" />
</HorizontalLayout>
<Control height="12" />
<Button name="btnLogin" text="登录" height="44" bkcolor="#FF3B2BD6" textcolor="#FFFFFFFF" font="1" />
<Label name="lblTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<Label text="用户名" textcolor="#FF4B5563" height="18" />
<Edit name="regUser" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control height="6" />
<Label text="邮箱" textcolor="#FF4B5563" height="18" />
<HorizontalLayout height="38">
<Edit name="regEmail" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="104" height="34" bkcolor="#FFD8EAE0" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<Label text="邮箱验证码" textcolor="#FF4B5563" height="18" />
<Edit name="regCode" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" />
<Control height="6" />
<Label text="密码" textcolor="#FF4B5563" height="18" />
<Edit name="regPass" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" password="true" />
<Control height="6" />
<Label text="确认密码" textcolor="#FF4B5563" height="18" />
<Edit name="regPass2" height="34" bkcolor="#FFF1F3F7" nativebkcolor="#FFF1F3F7" textcolor="#FF1F2430" bordercolor="#FFC3CBD8" inset="10,0,0,0" password="true" />
<Control height="12" />
<Button name="btnRegister" text="注册并登录" height="44" bkcolor="#FF128A5B" textcolor="#FFFFFFFF" font="1" />
<Label name="regTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
</VerticalLayout>
</HorizontalLayout>
</VerticalLayout>
</Window>)SKIN";
static const char *kSkin_industrial = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="580,548" caption="0,0,-1,46" mininfo="580,548" bkcolor="#FF0A1520">
<VerticalLayout bkcolor="#FF0A1520" bordercolor="#FF1F4E79" bordersize="1">
<HorizontalLayout height="46" bkcolor="#FF10304C">
<Label text="AUTHORIZATION" textcolor="#FF7FD1FF" font="1" inset="18,0,0,0" />
<Control />
<Button name="tabLogin" text="LOGIN" width="80" height="46" bkcolor="#FF1A5A8C" textcolor="#FFFFFFFF" />
<Button name="tabRegister" text="REGISTER" width="96" height="46" bkcolor="#00000000" textcolor="#FF9FC8E6" />
<Button name="btnClose" text="X" width="46" height="46" textcolor="#FFBEE3FF" bkcolor="#FF10304C" hotbkcolor="#33FFFFFF" />
</HorizontalLayout>
<VerticalLayout inset="24,16,24,16">
<Label name="lblApp" text="演示程序" textcolor="#FF8FC4E6" height="26" font="1" />
<Control height="6" />
<VerticalLayout name="panelLogin" height="auto">
<Label text="账号或卡密" textcolor="#FF9FC0D8" height="18" />
<Edit name="editUser" height="40" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" />
<Control height="10" />
<Label text="密码" textcolor="#FF9FC0D8" height="18" />
<Edit name="editPass" height="40" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" password="true" />
<Control height="10" />
<HorizontalLayout height="22">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FF9FC0D8" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FF9FC0D8" bkcolor="#00000000" width="78" />
</HorizontalLayout>
<Control height="12" />
<Button name="btnLogin" text="登录" height="44" bkcolor="#FF1F6FB2" textcolor="#FFFFFFFF" font="1" />
<Label name="lblTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<Label text="用户名" textcolor="#FF9FC0D8" height="18" />
<Edit name="regUser" height="34" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" />
<Control height="6" />
<Label text="邮箱" textcolor="#FF9FC0D8" height="18" />
<HorizontalLayout height="38">
<Edit name="regEmail" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="104" height="34" bkcolor="#FF1B4A3C" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<Label text="邮箱验证码" textcolor="#FF9FC0D8" height="18" />
<Edit name="regCode" height="34" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" />
<Control height="6" />
<Label text="密码" textcolor="#FF9FC0D8" height="18" />
<Edit name="regPass" height="34" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" password="true" />
<Control height="6" />
<Label text="确认密码" textcolor="#FF9FC0D8" height="18" />
<Edit name="regPass2" height="34" bkcolor="#FF14304A" nativebkcolor="#FF14304A" textcolor="#FFEAF6FF" bordercolor="#FF23567F" inset="10,0,0,0" password="true" />
<Control height="12" />
<Button name="btnRegister" text="注册并登录" height="44" bkcolor="#FF1F7A5E" textcolor="#FFFFFFFF" font="1" />
<Label name="regTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<Control height="6" />
<Label name="lblDevice" text="设备" textcolor="#FF5F89A6" height="18" />
<HorizontalLayout height="24">
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF6FA8C8" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF6FA8C8" bkcolor="#00000000" />
<Control />
</HorizontalLayout>
</VerticalLayout>
</VerticalLayout>
</Window>)SKIN";
static const char *kSkin_terminal = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="600,548" caption="0,0,-1,38" mininfo="600,548" bkcolor="#FF0B0F0C">
<VerticalLayout bkcolor="#FF0B0F0C" bordercolor="#FF2B3A2D" bordersize="1">
<HorizontalLayout height="38" bkcolor="#FF101710">
<Label text="vfy@local:~$" textcolor="#FF54C97A" inset="14,0,0,0" />
<Control />
<Button name="btnClose" text="X" width="38" height="38" textcolor="#FF7FB08C" bkcolor="#FF101710" hotbkcolor="#33FFFFFF" />
</HorizontalLayout>
<HorizontalLayout height="34" bkcolor="#FF0E150F">
<Button name="tabLogin" text="[ login ]" width="96" height="34" bkcolor="#00000000" textcolor="#FF7FE39B" />
<Button name="tabRegister" text="[ register ]" width="108" height="34" bkcolor="#00000000" textcolor="#FF4E7A5C" />
<Control />
</HorizontalLayout>
<VerticalLayout inset="16,10,16,12">
<Label name="lblApp" text="# 演示程序" textcolor="#FF7FE39B" height="24" />
<Control height="6" />
<VerticalLayout name="panelLogin" height="auto">
<Label text="账号或卡密" textcolor="#FF5E8A6C" height="18" />
<Edit name="editUser" height="40" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" />
<Control height="10" />
<Label text="密码" textcolor="#FF5E8A6C" height="18" />
<Edit name="editPass" height="40" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" password="true" />
<Control height="10" />
<HorizontalLayout height="22">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FF5E8A6C" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FF5E8A6C" bkcolor="#00000000" width="78" />
</HorizontalLayout>
<Control height="12" />
<Button name="btnLogin" text="[ 执行登录 ]" height="44" bkcolor="#FF1B7A4E" textcolor="#FFFFFFFF" font="1" />
<Label name="lblTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<Label text="用户名" textcolor="#FF5E8A6C" height="18" />
<Edit name="regUser" height="34" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" />
<Control height="6" />
<Label text="邮箱" textcolor="#FF5E8A6C" height="18" />
<HorizontalLayout height="38">
<Edit name="regEmail" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="104" height="34" bkcolor="#FF234A33" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<Label text="邮箱验证码" textcolor="#FF5E8A6C" height="18" />
<Edit name="regCode" height="34" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" />
<Control height="6" />
<Label text="密码" textcolor="#FF5E8A6C" height="18" />
<Edit name="regPass" height="34" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" password="true" />
<Control height="6" />
<Label text="确认密码" textcolor="#FF5E8A6C" height="18" />
<Edit name="regPass2" height="34" bkcolor="#FF16211A" nativebkcolor="#FF16211A" textcolor="#FFD7F5DF" bordercolor="#FF2B3A2D" inset="10,0,0,0" password="true" />
<Control height="12" />
<Button name="btnRegister" text="注册并登录" height="44" bkcolor="#FF1B7A4E" textcolor="#FFFFFFFF" font="1" />
<Label name="regTip" text="" textcolor="#FFE08A8A" height="24" inset="0,6,0,0" />
</VerticalLayout>
<Control height="6" />
<Label name="lblDevice" text="设备" textcolor="#FF4E7A5C" height="18" />
<HorizontalLayout height="24">
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF6FA08A" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF6FA08A" bkcolor="#00000000" />
<Control />
</HorizontalLayout>
</VerticalLayout>
</VerticalLayout>
</Window>)SKIN";
static const char *kSkin_compact = R"SKIN(<?xml version="1.0" encoding="utf-8"?>
<Window size="760,206" caption="0,0,-1,38" mininfo="760,206" bkcolor="#FF11151A">
<VerticalLayout bkcolor="#FF11151A" bordercolor="#FF2A3440" bordersize="1">
<HorizontalLayout height="38" bkcolor="#FF161C22">
<Label text="账号" textcolor="#FFA8BCCE" inset="16,0,0,0" />
<Control />
<Button name="btnClose" text="X" width="38" height="38" textcolor="#FFA8BCCE" bkcolor="#FF161C22" hotbkcolor="#33FFFFFF" />
</HorizontalLayout>
<HorizontalLayout inset="16,12,16,10">
<VerticalLayout width="200">
<Label name="lblApp" text="演示程序" textcolor="#FFEAF2FA" height="26" font="1" />
<Label name="lblDevice" text="设备" textcolor="#FF6B7C8C" height="20" />
<Control height="12" />
<Button name="tabLogin" text="登录" width="90" height="32" bkcolor="#FF2E9E6B" textcolor="#FFFFFFFF" />
<Control height="6" />
<Button name="tabRegister" text="注册" width="90" height="32" bkcolor="#FF1B232B" textcolor="#FF9FB3C8" />
</VerticalLayout>
<Control width="16" />
<VerticalLayout>
<VerticalLayout name="panelLogin" height="auto">
<HorizontalLayout height="40">
<HorizontalLayout width="214" bkcolor="#FF1B232B">
<Label text="账号" width="46" textcolor="#FF7E90A2" inset="10,0,0,0" />
<Edit name="editUser" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" inset="0,0,0,0" />
</HorizontalLayout>
<Control width="10" />
<HorizontalLayout width="214" bkcolor="#FF1B232B">
<Label text="密码" width="46" textcolor="#FF7E90A2" inset="10,0,0,0" />
<Edit name="editPass" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" inset="0,0,0,0" password="true" />
</HorizontalLayout>
<Control width="10" />
<Button name="btnLogin" text="登录" width="110" height="40" bkcolor="#FF2E9E6B" textcolor="#FFFFFFFF" font="1" />
</HorizontalLayout>
<HorizontalLayout height="26">
<Label name="chkBox" width="14" height="14" bkcolor="#00000000" bordercolor="#FF6B7C8C" bordersize="1" />
<Control width="8" />
<Button name="btnRemember" text="记住账号" textcolor="#FF6B7C8C" bkcolor="#00000000" width="120" />
<Label name="lblTip" text="" textcolor="#FFD98A8A" />
</HorizontalLayout>
<Control height="6" />
<HorizontalLayout height="24">
<Button name="btnLinkCard" text="卡密充值" width="96" textcolor="#FF7FA5CC" bkcolor="#00000000" />
<Button name="btnLinkForgot" text="忘记密码" width="96" textcolor="#FF7FA5CC" bkcolor="#00000000" />
<Control />
</HorizontalLayout>
</VerticalLayout>
<VerticalLayout name="panelRegister" height="auto" visible="false">
<HorizontalLayout height="36">
<Edit name="regUser" width="160" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" bordercolor="#FF32404E" inset="10,0,0,0" />
<Control width="8" />
<Edit name="regEmail" width="200" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" bordercolor="#FF32404E" inset="10,0,0,0" />
<Control width="8" />
<Button name="btnSendCode" text="发送验证码" width="100" height="36" bkcolor="#FF234A33" textcolor="#FFFFFFFF" />
</HorizontalLayout>
<Control height="6" />
<HorizontalLayout height="36">
<Edit name="regCode" width="160" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" bordercolor="#FF32404E" inset="10,0,0,0" />
<Control width="8" />
<Edit name="regPass" width="150" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" bordercolor="#FF32404E" inset="10,0,0,0" password="true" />
<Control width="8" />
<Edit name="regPass2" width="150" bkcolor="#FF1B232B" nativebkcolor="#FF1B232B" textcolor="#FFFFFFFF" bordercolor="#FF32404E" inset="10,0,0,0" password="true" />
<Control width="8" />
<Button name="btnRegister" text="注册" width="90" height="36" bkcolor="#FF2E9E6B" textcolor="#FFFFFFFF" font="1" />
</HorizontalLayout>
<Label name="regTip" text="" textcolor="#FFD98A8A" height="22" />
</VerticalLayout>
</VerticalLayout>
</HorizontalLayout>
</VerticalLayout>
</Window>)SKIN";
struct SkinDef { const char *name; const char *xml; int w, h; };
static const SkinDef kSkins[] = {
{ "dark", kSkin_dark, 452, 548 },
{ "light", kSkin_light, 452, 548 },
{ "split", kSkin_split, 660, 548 },
{ "card", kSkin_card, 700, 564 },
{ "industrial", kSkin_industrial, 580, 548 },
{ "terminal", kSkin_terminal, 600, 548 },
{ "compact", kSkin_compact, 760, 206 },
{ NULL, NULL, 0, 0 }
};
File diff suppressed because it is too large Load Diff