System.Object
Eplan.EplApi.MasterData.MDTranslationDatabase
System.Object
Eplan.EplApi.MasterData.MDTranslationDatabase
private static bool ReplaceText(string strSearchedText, ISOCode.Language eSearchedLang, string strTextToChange, ISOCode.Language eLangToChange) { bool bRetVal; MDTranslationDatabase oTrDB = new MDTranslationDatabase(); oTrDB.Open(false); MultiLangString oMLS = new MultiLangString(); oMLS.AddString(eSearchedLang, strSearchedText); string strComment = ""; bRetVal = oTrDB.FindKeyword(eSearchedLang, ref oMLS, ref strComment); if (bRetVal) { oMLS.DeleteString(eLangToChange); oMLS.AddString(eLangToChange, strTextToChange); LanguageList lstLangs = new LanguageList(); lstLangs.Add(eLangToChange); bRetVal = oTrDB.EditKeyword(strSearchedText, eSearchedLang, oMLS, lstLangs); } oTrDB.Close(); return bRetVal; }
Name | Description | |
---|---|---|
MDTranslationDatabase Constructor | Constructor |
Name | Description | |
---|---|---|
IsOpen | Returns true if database is open. | |
IsReadOnly | Returns true if database is opened in readonly mode. | |
Languages | Returs the list of translation database languages. |
Name | Description | |
---|---|---|
AddKeyword | Overloaded. Adds keywords with texts in specified languages to the translation database. | |
AddLanguage | Adds new translation database language. | |
Close | Closes database. | |
DeleteKeyword | Deletes keyword. | |
DeleteLanguage | Deletes translation database language. | |
Dispose | Destructor for deterministic finalization of TranslationDatabase object. | |
EditKeyword | Overloaded. Edits keyword | |
FindAllKeywords | Finds all keywords selected by the searched text in given language. | |
FindKeyword | Finds keyword. | |
Open | Opens translation database using user settings. | |
OpenExclusive | Opens translation database in exlusive mode (.mdb only). |