Пример #1
0
 public void DeleteSearch()
 {
     if (searchManager.DeleteSearch(SelectedSearch.Owner, SelectedSearch.DescriptionKey))
     {
         for (var index = 0; index < Searches.Count; index++)
         {
             var search = Searches[index];
             if (search.Owner == SelectedSearch.Owner && search.DescriptionKey == SelectedSearch.DescriptionKey)
             {
                 Searches.RemoveAt(index);
                 break;
             }
         }
     }
     else
     {
         MessageBox.Show("Failed to delete search " + SelectedSearch.DescriptionKey,
                         "Search Management Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }