Click here to Skip to main content
15,886,689 members
Articles / Programming Languages / C#

LyricsFetcher - The Easiest Way to Find Lyrics for your Songs

Rate me:
Please Sign up or sign in to vote.
4.93/5 (82 votes)
29 Oct 2009GPL325 min read 201.2K   2.4K   184  
An article describing the development of a non-trivial C#/.NET application to fetch lyrics for songs.
/*
 * This WaitCursor is a mind-boggling simple class to stop me
 * having to use so many try...finally blocks in my code.
 *
 * Author: Phillip Piper
 * Date: 28/02/2009 11:00 am
 *
 * CHANGE LOG:
 * when who what
 * 2009-02-28  JPP  Initial Version
 */

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace LyricsFetcher {
    /// <summary>
    /// Create one of these in a using statement to have a wait cursor
    /// while the block executes
    /// </summary>
    public class WaitCursor : IDisposable {
        /// <summary>
        /// Create a WaitCursor with the normal wait cursor
        /// </summary>
        public WaitCursor() : this(Cursors.WaitCursor) {
        }

        /// <summary>
        /// Create a WaitCursor with the given cursor
        /// </summary>
        /// <param name="cursor"></param>
        public WaitCursor(Cursor cursor) {
            Cursor.Current = cursor;
        }

        /// <summary>
        /// Revert to the normal cursor on disposal
        /// </summary>
        public void Dispose() {
            Cursor.Current = Cursors.Default;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Team Leader
Australia Australia
Phillip has been playing with computers since the Apple II was the hottest home computer available. He learned the fine art of C programming and Guru meditation on the Amiga.

C# and Python are his languages of choice. Smalltalk is his mentor for simplicity and beauty. C++ is to programming what drills are to visits to the dentist.

He worked for longer than he cares to remember as Lead Programmer and System Architect of the Objective document management system. (www.objective.com)

He has lived for 10 years in northern Mozambique, teaching in villages.

He has developed high volume trading software, low volume FX trading software, and is currently working for Atlassian on HipChat.

Comments and Discussions