TelephoneListPID->insert(std::make_pair(*TelephoneCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
- if (ValidNumber == TRUE){
-
- TelephoneListPref->erase(*TelephoneCount);
- TelephoneListPref->insert(std::make_pair(*TelephoneCount, PriorityNumber));
-
- }
+ ProcessIntegerValue(this, TelephoneListPref, &PropertyValue, TelephoneCount);
} else {
} else if (PropertyName == wxT("PREF")){
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
-
- LanguageListPref->erase(*LanguageCount);
- LanguageListPref->insert(std::make_pair(*LanguageCount, PriorityNumber));
-
- }
+ ProcessIntegerValue(this, LanguageListPref, &PropertyValue, LanguageCount);
} else {