Exemplo n.º 1
0
        public static void Test()
        {
            AudioPlay player = new AudioPlay();

            PlayCommand playCmd = new PlayCommand(player);
            RewindCommand rewindCmd = new RewindCommand(player);
            StopCommand stopCmd = new StopCommand(player);

            //Keyboard kb = new Keyboard();
            //kb.PlayCommand = playCmd;
            //kb.RewindCommand = rewindCmd;
            //kb.StopCommand = stopCmd;
            //kb.Play();
            //kb.Rewind();
            //kb.Stop();

            IMacroCommand macroCmd = new MacroAudioCommand();
            macroCmd.Add(playCmd);
            macroCmd.Add(rewindCmd);
            macroCmd.Add(stopCmd);

            macroCmd.Execute();
        }
Exemplo n.º 2
0
        public static void Test()
        {
            AudioPlay player = new AudioPlay();

            PlayCommand   playCmd   = new PlayCommand(player);
            RewindCommand rewindCmd = new RewindCommand(player);
            StopCommand   stopCmd   = new StopCommand(player);

            //Keyboard kb = new Keyboard();
            //kb.PlayCommand = playCmd;
            //kb.RewindCommand = rewindCmd;
            //kb.StopCommand = stopCmd;
            //kb.Play();
            //kb.Rewind();
            //kb.Stop();

            IMacroCommand macroCmd = new MacroAudioCommand();

            macroCmd.Add(playCmd);
            macroCmd.Add(rewindCmd);
            macroCmd.Add(stopCmd);

            macroCmd.Execute();
        }