|
@@ -412,6 +412,16 @@ void CPropertiesWnd::LoadKeyInfo(std::vector<KeyInfo>& vtKeyInfo, TString path)
|
|
|
// 是否禁用;
|
|
|
it->pbtnInfo->pBTN->EnableWindow(it->bUse);
|
|
|
|
|
|
+ // 如果红外值空,禁用;
|
|
|
+ if ( Global::g_nVersion == 1 && it->strValue.size() == 0 )
|
|
|
+ {
|
|
|
+ it->bUse = false;
|
|
|
+ }
|
|
|
+ if ( Global::g_nVersion == 2 && it->strValue2.size() == 0 )
|
|
|
+ {
|
|
|
+ it->bUse = false;
|
|
|
+ }
|
|
|
+
|
|
|
// 存入map中;
|
|
|
m_map_key.insert(std::pair<UINT, KeyInfo*>(BTNID + i, &*it));
|
|
|
|
|
@@ -604,10 +614,16 @@ void CPropertiesWnd::ConvertOldSignalsToNew(std::string strOldSignal, std::strin
|
|
|
pType->SetText(it->protocol.c_str());
|
|
|
pXmlElent->InsertEndChild(pType);
|
|
|
|
|
|
- tinyxml2::XMLElement* pValue = doc.NewElement("VALUE");
|
|
|
+ tinyxml2::XMLElement* pValue = NULL;
|
|
|
+ if ( Global::g_nVersion == 1 )
|
|
|
+ pValue = doc.NewElement("VALUE");
|
|
|
+ else if ( Global::g_nVersion == 2 )
|
|
|
+ pValue = doc.NewElement("VALUE2");
|
|
|
+ else if ( Global::g_nVersion == 3 )
|
|
|
+ pValue = doc.NewElement("VALUE3");
|
|
|
pValue->SetText(it->key.c_str());
|
|
|
pXmlElent->InsertEndChild(pValue);
|
|
|
-
|
|
|
+
|
|
|
pXmlRoot->InsertEndChild(pXmlElent);
|
|
|
}
|
|
|
}
|