0

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;
            }

        }

    }
}
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by tanor
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.