Esempio n. 1
0
        static void Main(string[] args)
        {
            IClipRepository repo = new LocalClipDirectory(@"C:\Users\Kyle\Desktop\Airplane");
            ClipPlayer player = new ClipPlayer(repo);
            AbstractCommand random = new PlayRandomCommand(player);
            AbstractCommand list = new ListCommand(player);
            AbstractCommand play = new PlayCommand(player);

            ConsoleRunner app = new ConsoleRunner(player);
            app.AddCommand(list);
            app.AddCommand(play);
            app.AddCommand(random);
            app.Run();
        }
Esempio n. 2
0
 public PlayCommand(ClipPlayer player)
     : base(player)
 {
     this.CommandString = "play";
 }
 public PlayRandomCommand(ClipPlayer player)
     : base(player)
 {
     this.CommandString = "playrandom";
 }
Esempio n. 4
0
 public ConsoleRunner(ClipPlayer player)
 {
     this.player = player;
     //command = new StringBuilder();
     commandDictionary = new Dictionary<string, AbstractCommand>();
 }
Esempio n. 5
0
 public ListCommand(ClipPlayer player)
     : base(player)
 {
     CommandString = "list";
 }
Esempio n. 6
0
 public AbstractCommand(ClipPlayer player)
 {
     this.player = player;
 }