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