Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
     }
 }