private int GetActivatedAlarmIndex() { //create instance of alarm languages reader SavedLanguagesReader reader = new SavedLanguagesReader(_realmProvider); //get language identity return(reader.GetLanguagesList().Where(x => x.LanguageSelected == true).First().Identity); }
private List <LanguageItemModel> GetCurrentLanguageConfig() { _logger.Info($"Getting current language configuration from DB."); SavedLanguagesReader reader = new SavedLanguagesReader(_realmProvider); List <AlarmLanguageDefinition> langDict = reader.GetLanguagesList(); List <LanguageItemModel> lang = new List <LanguageItemModel>(); foreach (var item in langDict) { lang.Add(new LanguageItemModel() { LanguageID = item.Identity, Language = item.LanguageText, Enabled = item.LanguageEnabled, Selected = item.LanguageSelected, }); } return(lang); }
private int CheckAmountOfTextsLanguages() { SavedLanguagesReader reader = new SavedLanguagesReader(_realmProvider); return(reader.GetLanguagesList().Count()); }
private List <AlarmLanguageDefinition> ReadAllData() { SavedLanguagesReader reader = new SavedLanguagesReader(_realmProvider); return(reader.GetLanguagesList()); }