Skip to content

Instantly share code, notes, and snippets.

@Microncode
Last active February 25, 2020 23:05
Show Gist options
  • Save Microncode/e2023e64b8b8848381f8c6bc44564973 to your computer and use it in GitHub Desktop.
Save Microncode/e2023e64b8b8848381f8c6bc44564973 to your computer and use it in GitHub Desktop.
Here is a snap example of using the CSFreeDB in order to get the information about ab Audio CD using C# in async mode:
//Init the component
freeDB1.UserName = "Your email";
freeDB1.UserKey = "Your registration key";
// Tracks names:
foreach (string trckFreeDB in freeDB1.GetFreeDBInfoAsync(cboDevice.SelectedIndex).FreeDBTracksInfo)
{
lstTracks.Items[cntr].SubItems[1].Text = trckFreeDB.ToString();
cntr = cntr + 1;
}
//Album / Artist name:
if (cntr > 0)
{
lblArtist.Text = "Artist: " + freeDB1.GetFreeDBInfoAsync(cboDevice.SelectedIndex).Artist;
lblAlbum.Text = "Album: " + freeDB1.GetFreeDBInfoAsync(cboDevice.SelectedIndex).AlbumName;
lblAlbumDiscID.Text = "DiscID: " + freeDB1.GetFreeDBInfoAsync(cboDevice.SelectedIndex).DiscID;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment