protected void LoadTheme(string file) { try { CurrentTheme = new ThemeViewModel(repository.LoadTheme(file)); } catch (Exception ex) { MessageBox.Show(ex.Message, "Echec du chargement du thème"); CurrentTheme = null; } }
public WordCollectionViewModel(WordCollection collection, int index, ThemeViewModel theme) { Words = collection ?? throw new ArgumentNullException(nameof(collection)); this.themeViewModel = theme ?? throw new ArgumentNullException(nameof(theme)); Index = index; }