DFS_Shuo_Chen 1 долоо хоног өмнө
parent
commit
d090dfded5

BIN
VaporRecoveryMonitor/VaporRecoveryMonitor/Bin/VaporRecoveryMonitor.exe


+ 4 - 8
VaporRecoveryMonitor/VaporRecoveryMonitor/Bin/skin_1366_768/setting.xml

@@ -139,14 +139,10 @@
       <!--智能诊断设置-->
       <horizontallayout padding="5,10,5,5" bkcolor="#ffd6dfea">
         <verticallayout padding="15,15,5,5">
-          
-          <horizontallayout height="50">
-            <label text="智能诊断功能配置区域" width="300" font="515"></label>
+          <horizontallayout height="50" align="center"><label text="开启智能诊断:" width="150" font="515"></label>
+            <CheckBox  name="smart_analyse_enable" text="启用" width="80" font="515" selected="false"></CheckBox>
           </horizontallayout>
-          
-          <horizontallayout>
-          </horizontallayout>
-          
+          <horizontallayout height="60"><button name="btn_save_smart_analyse" text="保存设置" width="150" height="40" font="516" bkcolor="#ff2460a0" selectedbkcolor="#ff95b4de"></button></horizontallayout>
         </verticallayout>
       </horizontallayout>
 
@@ -223,4 +219,4 @@
     
     
   </verticallayout>
-</window>
+</window>

BIN
VaporRecoveryMonitor/VaporRecoveryMonitor/VaporRecoveryMonitor.v12.suo


+ 11 - 2
VaporRecoveryMonitor/VaporRecoveryMonitor/VaporRecoveryMonitor/vr_app.cpp

@@ -115,7 +115,7 @@ void VRMonitorApp::InitWindow()
 	}
 
 	// 加载智能诊断初始值
-	DUI_OBJ_EXT(smart_analyse_enable, COptionUI);
+	DUI_OBJ_EXT(smart_analyse_enable, CCheckBoxUI);
 	if (smart_analyse_enable && g_enableSmartAnalyse)
 	{
 		smart_analyse_enable->Selected(true);
@@ -1198,10 +1198,19 @@ void VRMonitorApp::OnClick(DuiLib::TNotifyUI& msg)
 		DUI_OBJ_EXT(setting_tab, CTabLayoutUI);
 		setting_tab->SelectItem(3);
 	}
+	else if (itemName == L"smart_analyse_enable")
+	{
+		// 点击复选框时自动切换选中状态
+		DUI_OBJ_EXT(smart_analyse_enable, CCheckBoxUI);
+		if (smart_analyse_enable)
+		{
+			// DUI 框架会自动处理选中/取消选中,无需手动设置
+		}
+	}
 	else if (itemName == L"btn_save_smart_analyse")
 	{
 		// 保存智能诊断设置
-		DUI_OBJ_EXT(smart_analyse_enable, COptionUI);
+		DUI_OBJ_EXT(smart_analyse_enable, CCheckBoxUI);
 		if (smart_analyse_enable && smart_analyse_enable->IsSelected())
 		{
 			g_enableSmartAnalyse = 1;