954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Itunes Type Class Help

Okay heres my problem, the fastforward and its opposite don't work correctly. I want the user to be able to enter X seconds to ff or go back, but since its a COM and it doesn't provide this function (I think its meant for WPF or WF where you just hold the button as long as you want to ff or go back), is there anyway I can implement this myself.

ANYWAYS.... Heres my code. Feel free to use it as your own if you want.
If you do make sure to reference to Itunes type class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTunesLib;
namespace itunes_try
{
    class Itunes
    {
        public Itunes(iTunesApp Instance)
        {
            App = Instance;
        }

        iTunesApp App;

        public void Command(string Command, string File = " ")
        {
            Command.ToLower();
            switch (Command)
            {
                case "playfile":
                    App.PlayFile(File);
                    break;
                case "play":
                    App.Play();
                    break;
                case "stop":
                    App.Stop();
                    break;
                case "next":
                    App.NextTrack();
                    break;
                case "back":
                    App.PreviousTrack();
                    break;
                case "fastforward":
                    App.FastForward();
                    break;
                case "fastbackward":
                    App.BackTrack();
                    break;
                case "quit":
                    App.Quit();
                    break;
                case "pause":
                    App.Pause();
                    break;
                case "getname":
                    Console.WriteLine(App.CurrentStreamTitle);
                    break;
                default:
                    Console.WriteLine("Please enter one of the following commands: PlayFile, Play, Pause, "+
                        "Quit, FastForward, FastBackward, Next, Back, Stop");
                    break;
            }

        }

    }
}
wade2462
Newbie Poster
16 posts since May 2010
Reputation Points: 10
Solved Threads: 1
 

I do not understand what is meant by the reference

tanor
Newbie Poster
5 posts since Jun 2010
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: