|  | @@ -852,6 +852,15 @@ void CMainFrame::ReadRsRunCfg(RsRunCfg& rscfg)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	GetPrivateProfileString(_T("Sound"), _T("sound_list"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
 | 
	
		
			
				|  |  |  	rscfg.sound_list = szValue;
 | 
	
		
			
				|  |  | +	int pos1(0), pos2(0);
 | 
	
		
			
				|  |  | +	pos1 = rscfg.sound_list.find_first_of('[');
 | 
	
		
			
				|  |  | +	pos2 = rscfg.sound_list.find_first_of(',');
 | 
	
		
			
				|  |  | +	if (pos1 != std::string::npos && pos2 != std::string::npos)
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		rscfg.sound1 = rscfg.sound_list.substr(pos1 + 1, pos2 - pos1 - 1);
 | 
	
		
			
				|  |  | +		rscfg.sound2 = rscfg.sound_list.substr(pos2 + 1, rscfg.sound_list.length() - pos2 - 2);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	 
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	GetPrivateProfileString(_T("COMM"), _T("issendkeytakepicture_tester"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
 | 
	
		
			
				|  |  |  	rscfg.full_cut = szValue;
 | 
	
	
		
			
				|  | @@ -1153,7 +1162,7 @@ void CMainFrame::InitDevicePanel()
 | 
	
		
			
				|  |  |  	CMFCRibbonEdit* pSoundLevel = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_EDIT_SOUND_LEVEL));
 | 
	
		
			
				|  |  |  	if (pSoundLevel)
 | 
	
		
			
				|  |  |  	{
 | 
	
		
			
				|  |  | -		pSoundLevel->SetEditText(m_bdcfg.reset_time.c_str());
 | 
	
		
			
				|  |  | +		pSoundLevel->SetEditText(m_rscfg.sound1.c_str());
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	// 全步骤截图;
 | 
	
	
		
			
				|  | @@ -1224,17 +1233,18 @@ void CMainFrame::OnHadSound()
 | 
	
		
			
				|  |  |  	std::thread t([&]() {
 | 
	
		
			
				|  |  |  		// 强制stdion, stdout和stderr完全无缓冲:python -u
 | 
	
		
			
				|  |  |  		TCHAR szCommandLine[MAX_PATH] = { 0 };
 | 
	
		
			
				|  |  | -		_stprintf_s(szCommandLine, _T("python -W ignore -u \"%s%s\""), Global::g_szPython27Dir, _T("Lib\\site-packages\\ssat_sdk\\sound_init.py"));
 | 
	
		
			
				|  |  | +		_stprintf_s(szCommandLine, _T("python -W ignore \"%s%s\" >>%ssound_log.txt"), Global::g_szPython27Dir, _T("Lib\\site-packages\\ssat_sdk\\sound_init.py"), Global::g_szCurModuleDir);
 | 
	
		
			
				|  |  |  		WinExec(szCommandLine, SW_HIDE);
 | 
	
		
			
				|  |  | +		OutputDebugString(szCommandLine);
 | 
	
		
			
				|  |  |  		// 等待10秒;
 | 
	
		
			
				|  |  | -		Sleep(15000);
 | 
	
		
			
				|  |  | +		Sleep(30000);
 | 
	
		
			
				|  |  |  		ReadRsRunCfg(m_rscfg);
 | 
	
		
			
				|  |  |  		// Ribbon Combobox添加默认项;
 | 
	
		
			
				|  |  |  		CMFCRibbonBar* pRibbon = g_pMainFrame->GetRibbonBar();
 | 
	
		
			
				|  |  |  		CMFCRibbonEdit* pSoundLevel = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_EDIT_SOUND_LEVEL));
 | 
	
		
			
				|  |  |  		if (pSoundLevel)
 | 
	
		
			
				|  |  |  		{
 | 
	
		
			
				|  |  | -			pSoundLevel->SetEditText(m_bdcfg.reset_time.c_str());
 | 
	
		
			
				|  |  | +			pSoundLevel->SetEditText(m_rscfg.sound1.c_str());
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	});
 | 
	
		
			
				|  |  |  	t.detach();
 | 
	
	
		
			
				|  | @@ -1251,6 +1261,21 @@ void CMainFrame::OnUpdateHadSound(CCmdUI* pCmdUI)
 | 
	
		
			
				|  |  |  void CMainFrame::OnDefSound()
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |  	// TODO: 在此添加命令处理程序代码
 | 
	
		
			
				|  |  | +	TCHAR szValue[MAX_PATH] = { 0 };
 | 
	
		
			
				|  |  | +	TCHAR szBuffer[1024] = { 0 };
 | 
	
		
			
				|  |  | +	_stprintf_s(m_szRsCfgPath, _T("%s%s"), Global::g_szPython27Dir, _T("Lib\\site-packages\\ssat_sdk\\config\\resource_run.cfg"));
 | 
	
		
			
				|  |  | +	WritePrivateProfileString(_T("Sound"), _T("sound_list"), _T("[2000,2000]"), m_szRsCfgPath);
 | 
	
		
			
				|  |  | +	// Ribbon Combobox添加默认项;
 | 
	
		
			
				|  |  | +	m_rscfg.sound1 = _T("2000");
 | 
	
		
			
				|  |  | +	m_rscfg.sound2 = _T("2000");
 | 
	
		
			
				|  |  | +	m_rscfg.sound_list = _T("[2000,2000]");
 | 
	
		
			
				|  |  | +	CMFCRibbonBar* pRibbon = g_pMainFrame->GetRibbonBar();
 | 
	
		
			
				|  |  | +	CMFCRibbonEdit* pSoundLevel = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_EDIT_SOUND_LEVEL));
 | 
	
		
			
				|  |  | +	if (pSoundLevel)
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		pSoundLevel->SetEditText(m_rscfg.sound1.c_str());
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 |