Пример #1
0
 void ChooseFuzzyMatches(LibraryManager library, MapResult result)
 {
     if (result != null && result.FuzzyMatches.Count() > 0)
     {
         TaskUtil.PerformForegroundTask(this, library.ChooseFuzzyMatchesAsync(this, result.FuzzyMatches),
                         fuzzyResult => ShowSummary(result, fuzzyResult),
                         error => MessageBox.Show("An error occured when updating the library." +
                                                  Environment.NewLine + Environment.NewLine +
                                                  "Details : " + error.Message, "Error!",
                                                  MessageBoxButtons.OK, MessageBoxIcon.Error));
     }
 }
Пример #2
0
 void MapToLibrary(LibraryManager library)
 {
     TaskUtil.PerformForegroundTask(this, library.MapAsync(scrobbles),
         result => ChooseFuzzyMatches(library, result),
         error => MessageBox.Show("An error occured when updating the library." +
                                  Environment.NewLine + Environment.NewLine +
                                  "Details : " + error.Message, "Error!",
                                  MessageBoxButtons.OK, MessageBoxIcon.Error));
 }