private void PreviousElementHandler() { SelectedItem = SelectedItem == null || SelectedItem == Translations.First() ? Translations.Last() : Translations.Where(t => t.Id == SelectedItem.Id - 1).First(); EncodingVM.SetItem(SelectedItem); }
// TODO refactor rm and ci public ModifyWordVM(List <Translation> translations, EncodingVM encodingVM, List <Language.Languages> languages, ResourceManager rm, CultureInfo ci) { EncodingVM = encodingVM; Translations = ConvertionHelper.ConvertTo(translations, languages); UILanguage1 = languages[0].ToDescription(); UILanguage2 = languages[1].ToDescription(); TranslationsModel = translations; this.rm = rm; this.ci = ci; }
private void SelectionHandler(TranslationVM translation) { EncodingVM.SetItem(SelectedItem); }