|
|
@ -105,7 +105,7 @@ void CToolsZoneList::reset()
|
|
|
|
void CToolsZoneList::addItem (const string &itemName)
|
|
|
|
void CToolsZoneList::addItem (const string &itemName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_ItemNames.push_back (itemName);
|
|
|
|
_ItemNames.push_back (itemName);
|
|
|
|
InsertString (-1, utf8ToTStr(itemName));
|
|
|
|
InsertString(-1, nlUtf8ToTStr(itemName));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
@ -259,15 +259,15 @@ CToolsZoneList *CToolsZone::getListCtrl()
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
void CToolsZone::addToAllCatTypeCB (const string &Name)
|
|
|
|
void CToolsZone::addToAllCatTypeCB (const string &Name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CComboBox* pCB;
|
|
|
|
CComboBox *pCB;
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE1);
|
|
|
|
pCB = (CComboBox *)GetDlgItem(IDC_CATTYPE1);
|
|
|
|
pCB->AddString (utf8ToTStr(Name));
|
|
|
|
pCB->AddString(nlUtf8ToTStr(Name));
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE2);
|
|
|
|
pCB = (CComboBox *)GetDlgItem(IDC_CATTYPE2);
|
|
|
|
pCB->AddString (utf8ToTStr(Name));
|
|
|
|
pCB->AddString(nlUtf8ToTStr(Name));
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE3);
|
|
|
|
pCB = (CComboBox *)GetDlgItem(IDC_CATTYPE3);
|
|
|
|
pCB->AddString (utf8ToTStr(Name));
|
|
|
|
pCB->AddString(nlUtf8ToTStr(Name));
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE4);
|
|
|
|
pCB = (CComboBox *)GetDlgItem(IDC_CATTYPE4);
|
|
|
|
pCB->AddString (utf8ToTStr(Name));
|
|
|
|
pCB->AddString(nlUtf8ToTStr(Name));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
@ -285,26 +285,26 @@ void CToolsZone::init (CMainFrame *pMF)
|
|
|
|
// Select right category types
|
|
|
|
// Select right category types
|
|
|
|
CComboBox* pCB;
|
|
|
|
CComboBox* pCB;
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE1);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE1);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType1));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType1));
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE2);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE2);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType2));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType2));
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE3);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE3);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType3));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType3));
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE4);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATTYPE4);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType4));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterType4));
|
|
|
|
|
|
|
|
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE1, IDC_CATVALUE1, &_MainFrame->_ZoneBuilder->_FilterType1);
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE1, IDC_CATVALUE1, &_MainFrame->_ZoneBuilder->_FilterType1);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE1);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE1);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue1));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue1));
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE2, IDC_CATVALUE2, &_MainFrame->_ZoneBuilder->_FilterType2);
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE2, IDC_CATVALUE2, &_MainFrame->_ZoneBuilder->_FilterType2);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE2);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE2);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue2));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue2));
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE3, IDC_CATVALUE3, &_MainFrame->_ZoneBuilder->_FilterType3);
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE3, IDC_CATVALUE3, &_MainFrame->_ZoneBuilder->_FilterType3);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE3);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE3);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue3));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue3));
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE4, IDC_CATVALUE4, &_MainFrame->_ZoneBuilder->_FilterType4);
|
|
|
|
updateComboPairAndFilter (IDC_CATTYPE4, IDC_CATVALUE4, &_MainFrame->_ZoneBuilder->_FilterType4);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE4);
|
|
|
|
pCB = (CComboBox*)GetDlgItem (IDC_CATVALUE4);
|
|
|
|
pCB->SelectString (-1, utf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue4));
|
|
|
|
pCB->SelectString(-1, nlUtf8ToTStr(_MainFrame->_ZoneBuilder->_FilterValue4));
|
|
|
|
|
|
|
|
|
|
|
|
// Select right operators
|
|
|
|
// Select right operators
|
|
|
|
CButton *pButAnd, *pButOr;
|
|
|
|
CButton *pButAnd, *pButOr;
|
|
|
@ -436,7 +436,7 @@ void CToolsZone::updateComboPairAndFilter (int CatTypeId, int CatValueId, string
|
|
|
|
CComboBox *pCBType, *pCBValue;
|
|
|
|
CComboBox *pCBType, *pCBValue;
|
|
|
|
pCBType = (CComboBox*)GetDlgItem (CatTypeId);
|
|
|
|
pCBType = (CComboBox*)GetDlgItem (CatTypeId);
|
|
|
|
pCBType->GetLBText (pCBType->GetCurSel(), sTmp);
|
|
|
|
pCBType->GetLBText (pCBType->GetCurSel(), sTmp);
|
|
|
|
*pFilterType = tStrToUtf8(sTmp);
|
|
|
|
*pFilterType = NLMISC::tStrToUtf8(sTmp);
|
|
|
|
pCBValue = (CComboBox*)GetDlgItem (CatValueId);
|
|
|
|
pCBValue = (CComboBox*)GetDlgItem (CatValueId);
|
|
|
|
pCBValue->ResetContent ();
|
|
|
|
pCBValue->ResetContent ();
|
|
|
|
|
|
|
|
|
|
|
@ -446,7 +446,7 @@ void CToolsZone::updateComboPairAndFilter (int CatTypeId, int CatValueId, string
|
|
|
|
vector<string> allCategoryValues;
|
|
|
|
vector<string> allCategoryValues;
|
|
|
|
_MainFrame->_ZoneBuilder->getZoneBank().getCategoryValues (*pFilterType, allCategoryValues);
|
|
|
|
_MainFrame->_ZoneBuilder->getZoneBank().getCategoryValues (*pFilterType, allCategoryValues);
|
|
|
|
for(i = 0; i < allCategoryValues.size(); ++i)
|
|
|
|
for(i = 0; i < allCategoryValues.size(); ++i)
|
|
|
|
pCBValue->AddString (utf8ToTStr(allCategoryValues[i]));
|
|
|
|
pCBValue->AddString(nlUtf8ToTStr(allCategoryValues[i]));
|
|
|
|
pCBValue->SetCurSel (0);
|
|
|
|
pCBValue->SetCurSel (0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -488,7 +488,7 @@ void CToolsZone::OnSelectCatValue1()
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE1);
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE1);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue1 = tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue1 = NLMISC::tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -498,7 +498,7 @@ void CToolsZone::OnSelectCatValue2()
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE2);
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE2);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue2 = tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue2 = NLMISC::tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -508,7 +508,7 @@ void CToolsZone::OnSelectCatValue3()
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE3);
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE3);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue3 = tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue3 = NLMISC::tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -518,7 +518,7 @@ void CToolsZone::OnSelectCatValue4()
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
TCHAR sTmp[256];
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE4);
|
|
|
|
CComboBox *pCBValue = (CComboBox*)GetDlgItem (IDC_CATVALUE4);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
pCBValue->GetLBText (pCBValue->GetCurSel(), sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue4 = tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->_FilterValue4 = NLMISC::tStrToUtf8(sTmp);
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
_MainFrame->_ZoneBuilder->updateToolsZone ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|