Exemplo 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();
        }
Exemplo n.º 2
0
 public PlayCommand(ClipPlayer player)
     : base(player)
 {
     this.CommandString = "play";
 }
Exemplo n.º 3
0
 public PlayRandomCommand(ClipPlayer player)
     : base(player)
 {
     this.CommandString = "playrandom";
 }
Exemplo n.º 4
0
 public ConsoleRunner(ClipPlayer player)
 {
     this.player = player;
     //command = new StringBuilder();
     commandDictionary = new Dictionary<string, AbstractCommand>();
 }
Exemplo n.º 5
0
 public ListCommand(ClipPlayer player)
     : base(player)
 {
     CommandString = "list";
 }
Exemplo n.º 6
0
 public AbstractCommand(ClipPlayer player)
 {
     this.player = player;
 }