|
@@ -86,6 +86,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWndEx)
|
|
ON_COMMAND(ID_CHECK2_22293, &CMainFrame::OnCheck2_22293)
|
|
ON_COMMAND(ID_CHECK2_22293, &CMainFrame::OnCheck2_22293)
|
|
ON_UPDATE_COMMAND_UI(ID_CHECK2_22293, &CMainFrame::OnUpdateCheck2_22293)
|
|
ON_UPDATE_COMMAND_UI(ID_CHECK2_22293, &CMainFrame::OnUpdateCheck2_22293)
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
+ ON_COMMAND(ID_COMBO_TVPORT, &CMainFrame::OnCombo2Tv)
|
|
|
|
+ ON_UPDATE_COMMAND_UI(ID_COMBO_TVPORT, &CMainFrame::OnUpdateCombo2Tv)
|
|
END_MESSAGE_MAP()
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
// CMainFrame 构造/析构
|
|
// CMainFrame 构造/析构
|
|
@@ -833,6 +835,9 @@ void CMainFrame::ReadRsRunCfg(RsRunCfg& rscfg)
|
|
GetPrivateProfileString(_T("COMM"), _T("tg39_port"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
|
|
GetPrivateProfileString(_T("COMM"), _T("tg39_port"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
|
|
rscfg.tg39_port = szValue;
|
|
rscfg.tg39_port = szValue;
|
|
|
|
|
|
|
|
+ GetPrivateProfileString(_T("COMM"), _T("serial_communicator_port"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
|
|
|
|
+ rscfg.tv_port = szValue;
|
|
|
|
+
|
|
GetPrivateProfileString(_T("COMM"), _T("sat_home"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
|
|
GetPrivateProfileString(_T("COMM"), _T("sat_home"), NULL, szValue, MAX_PATH, m_szRsCfgPath);
|
|
rscfg.sat_home = szValue;
|
|
rscfg.sat_home = szValue;
|
|
|
|
|
|
@@ -1028,6 +1033,7 @@ void CMainFrame::InitCombobox_port()
|
|
ASSERT_VALID(pRibbon);
|
|
ASSERT_VALID(pRibbon);
|
|
CMFCRibbonComboBox* pCommbox1 = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_COMBO1_22293));
|
|
CMFCRibbonComboBox* pCommbox1 = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_COMBO1_22293));
|
|
CMFCRibbonComboBox* pCommbox2 = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_COMBO2_22293));
|
|
CMFCRibbonComboBox* pCommbox2 = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_COMBO2_22293));
|
|
|
|
+ CMFCRibbonComboBox* pCommboxTV = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_COMBO_TVPORT));
|
|
for (std::vector<std::string>::iterator it = m_vtCOM.begin(); it != m_vtCOM.end(); it++)
|
|
for (std::vector<std::string>::iterator it = m_vtCOM.begin(); it != m_vtCOM.end(); it++)
|
|
{
|
|
{
|
|
if (!IsPortInserted(pCommbox1, it->c_str()))
|
|
if (!IsPortInserted(pCommbox1, it->c_str()))
|
|
@@ -1035,12 +1041,17 @@ void CMainFrame::InitCombobox_port()
|
|
|
|
|
|
if (!IsPortInserted(pCommbox2, it->c_str()))
|
|
if (!IsPortInserted(pCommbox2, it->c_str()))
|
|
pCommbox2->AddItem(it->c_str());
|
|
pCommbox2->AddItem(it->c_str());
|
|
|
|
+
|
|
|
|
+ if (!IsPortInserted(pCommboxTV, it->c_str()))
|
|
|
|
+ pCommboxTV->AddItem(it->c_str());
|
|
}
|
|
}
|
|
|
|
|
|
if (m_rscfg.chroma1.size())
|
|
if (m_rscfg.chroma1.size())
|
|
pCommbox1->SelectItem(m_rscfg.chroma1.c_str());
|
|
pCommbox1->SelectItem(m_rscfg.chroma1.c_str());
|
|
if (m_rscfg.chroma2.size())
|
|
if (m_rscfg.chroma2.size())
|
|
pCommbox2->SelectItem(m_rscfg.chroma2.c_str());
|
|
pCommbox2->SelectItem(m_rscfg.chroma2.c_str());
|
|
|
|
+ if (m_rscfg.tv_port.size())
|
|
|
|
+ pCommboxTV->SelectItem(m_rscfg.tv_port.c_str());
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1514,3 +1525,27 @@ void CMainFrame::OnUpdateCheck2_22293(CCmdUI* pCmdUI)
|
|
else
|
|
else
|
|
pCmdUI->SetCheck(FALSE);
|
|
pCmdUI->SetCheck(FALSE);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+void CMainFrame::OnCombo2Tv()
|
|
|
|
+{
|
|
|
|
+ // TODO: 在此添加命令处理程序代码
|
|
|
|
+ CMFCRibbonBar* pRibbon = g_pMainFrame->GetRibbonBar();
|
|
|
|
+ ASSERT_VALID(pRibbon);
|
|
|
|
+ CMFCRibbonComboBox* pCombobxTV = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_COMBO_TVPORT));
|
|
|
|
+
|
|
|
|
+ // 保存到配置文件中;
|
|
|
|
+ int nCurSel = pCombobxTV->GetCurSel();
|
|
|
|
+ if (nCurSel != CB_ERR)
|
|
|
|
+ {
|
|
|
|
+ CString strTVPort = pCombobxTV->GetEditText();
|
|
|
|
+ WritePrivateProfileString(_T("COMM"), _T("serial_communicator_port"), strTVPort, m_szRsCfgPath);
|
|
|
|
+ m_rscfg.tv_port = strTVPort.GetString();
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+void CMainFrame::OnUpdateCombo2Tv(CCmdUI* pCmdUI)
|
|
|
|
+{
|
|
|
|
+ // TODO: 在此添加命令更新用户界面处理程序代码
|
|
|
|
+}
|