Jelajahi Sumber

禁用ub530

sat23 4 tahun lalu
induk
melakukan
c12385b0bc

+ 2 - 0
SATHelper/SATHelper/Global.cpp

@@ -260,6 +260,8 @@ namespace Global
 		// ¶ÁÈ¡ÅäÖÃÄÚÈÝ;
 		g_Config.enableTW = GetPrivateProfileInt(_T("SATHelper"), _T("enableTW"), 0, szConfigpath);
 		g_Config.useTW = GetPrivateProfileInt(_T("SATHelper"), _T("useTW"), 0, szConfigpath);
+		g_Config.useUB530 = GetPrivateProfileInt(_T("SATHelper"), _T("useUB530"), 1, szConfigpath);
+
 
 		GetPrivateProfileString(_T("SATHelper"), _T("MIInitBat"), NULL, szValue, MAX_PATH, szConfigpath);
 		if (_tcslen(szValue) == 0)

+ 1 - 0
SATHelper/SATHelper/Global.h

@@ -29,6 +29,7 @@ namespace Global
 		// 是否启用测试精灵;
 		bool enableTW;
 		bool useTW;
+		bool useUB530;
 		std::string strMIInitBat;
 		std::string strSCBCInitBat;
 		// script、tester、resource保存目录;

+ 14 - 11
SATHelper/SATHelper/MainFrm.cpp

@@ -350,18 +350,21 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
 #endif
 
 #if _USE_DLGVIEW_ // 第一个视图;
-	CCreateContext context;
-	m_pUB530View = new CChildFrame();
-	context.m_pLastView = NULL;
-	context.m_pCurrentFrame = this;
-	context.m_pCurrentDoc = m_pDoc;
-	context.m_pNewViewClass = RUNTIME_CLASS(CUB530View);
-	context.m_pNewDocTemplate = m_pDoc->GetDocTemplate();
-	if (m_pUB530View->LoadFrame(DLG_UB530VIEW, WS_MAXIMIZE | WS_CHILDWINDOW, this, &context))
+	if (Global::g_Config.useUB530)
 	{
-		//m_pUB530View->ShowWindow(SW_SHOWMAXIMIZED);
-		m_pUB530View->InitialUpdateFrame(context.m_pCurrentDoc, FALSE);
-		//m_pUB530View->MDIActivate();
+		CCreateContext context;
+		m_pUB530View = new CChildFrame();
+		context.m_pLastView = NULL;
+		context.m_pCurrentFrame = this;
+		context.m_pCurrentDoc = m_pDoc;
+		context.m_pNewViewClass = RUNTIME_CLASS(CUB530View);
+		context.m_pNewDocTemplate = m_pDoc->GetDocTemplate();
+		if (m_pUB530View->LoadFrame(DLG_UB530VIEW, WS_MAXIMIZE | WS_CHILDWINDOW, this, &context))
+		{
+			//m_pUB530View->ShowWindow(SW_SHOWMAXIMIZED);
+			m_pUB530View->InitialUpdateFrame(context.m_pCurrentDoc, FALSE);
+			//m_pUB530View->MDIActivate();
+		}
 	}
 #else
 	CCreateContext context;