private void RemoveDuplicates(Object sender, EventArgs args) { if (view.RequireConfirm(Properties.Resources.remove_dup_dlg_title, Properties.Resources.remove_dup_dlg_message)) { keywords = new KeywordBindingList(keywords.Distinct().ToList()); view.Bind(keywords); } }
private void LoadKeywordsFromDefaultStore() { try { keywords = new KeywordBindingList(repository.GetAll()); } catch (LoadDataException ex) { string message = ExceptionMessageUtility.BuildLoadDataExceptionMessage(ex); view.ShowMessage(message); keywords = new KeywordBindingList(); } view.Bind(keywords); }
private void OpenKeywordList(Object sender, OpenKeywordListEventArgs args) { try { string filter = keywords.FilterEnabled ? keywords.Filter : null; keywords = new KeywordBindingList(repository.GetFrom(new FileInfo(args.Path))); view.Bind(keywords); ResetKeywordsSelection(); if (filter != null) { keywords.Filter = filter; } } catch (LoadDataException ex) { view.ShowMessage(ex.Message); } }