wpf_player.AudioPlayerModel.AudioPlayerModel C# (CSharp) Method

AudioPlayerModel() public method

Constructor that initializes all commands and the reference to the Peer.
public AudioPlayerModel ( Peer p = null ) : System
p PeerLibrary.Peer
return System
        public AudioPlayerModel(Peer p = null)
        {
            //player.Done += new PlayerEx.DoneEventHandler(player_Done);
               //player.SetVolume(200, 200);
            player.PlaybackStopped += new EventHandler(playback_stopped);
            this.peer = p;
            Play = new AlwaysExecuteCommand(play);
            Pause = new AlwaysExecuteCommand(pause);
            Stop = new AlwaysExecuteCommand(stop);
            Close = new AlwaysExecuteCommand(close);
            MaxVolume = 1.0F;
            Volume = 0.4F;
        }