コード例 #1
0
ファイル: Searcher.cs プロジェクト: xhqiao89/HydroDesktop
 /// <summary>
 /// Run search.
 /// </summary>
 /// <param name="settings">Settings to start search.</param>
 /// <exception cref="ArgumentNullException">Throws if <paramref name="settings"/> is null.</exception>
 /// <exception cref="InvalidOperationException">Throws if previous search command is still active.</exception>
 /// <exception cref="SearchSettingsValidationException">Throws if settings to search has any problems.</exception>
 public void Run(SearchSettings settings)
 {
     if (settings == null)
     {
         throw new ArgumentNullException("settings");
     }
     if (IsBusy)
     {
         ShowUI();
         throw new InvalidOperationException("The previous search command is still active.");
     }
     _searcherUI = new SearchProgressForm(this);
     ShowUI();
     LogMessage("Search started.");
     InternalStartSearching(settings);
 }
コード例 #2
0
ファイル: Searcher.cs プロジェクト: CUAHSI/HydroClient
 /// <summary>
 /// Run search.
 /// </summary>
 /// <param name="settings">Settings to start search.</param>
 /// <exception cref="ArgumentNullException">Throws if <paramref name="settings"/> is null.</exception>
 /// <exception cref="InvalidOperationException">Throws if previous search command is still active.</exception>
 /// <exception cref="SearchSettingsValidationException">Throws if settings to search has any problems.</exception>
 public void Run(SearchSettings settings)
 {
     if (settings == null)
         throw new ArgumentNullException("settings");
     if (IsBusy)
     {
         ShowUI();
         throw new InvalidOperationException("The previous search command is still active.");
     }
     _searcherUI = new SearchProgressForm(this);
     ShowUI();
     LogMessage("Search started.");
     InternalStartSearching(settings);
 }