Exemplo n.º 1
0
 public IMediaPlayerBusiness GetNewPlayer()
 {
     if (Settings.SavedFile == null)
     {
         return(null);
     }
     else if (Settings.SavedFile.MediaPlayerApp == MediaPlayerApplication.Mpc)
     {
         return(new MpcPlayerBusiness());
     }
     else
     {
         return(new WmpPlayerBusiness(new WmpPlayerController(WmpPlayerWindow.Instance().Player, WmpPlayerWindow.Instance())));
     }
 }
        public async Task OpenMediaAsync(Media item)
        {
            this.Item = item;

            TitleText.Text                  = Item.Title;
            TitleText.ToolTip               = Item.Title;
            PositionText.Text               = "";
            playerWindow                    = WmpPlayerWindow.Instance();
            playerBusiness                  = new WmpPlayerBusiness(new WmpPlayerController(playerWindow.Player, playerWindow));
            playerBusiness.AllowClose       = true;
            playerBusiness.Closed          += playerBusiness_Closed;
            playerBusiness.PositionChanged += playerBusiness_PositionChanged;
            playerBusiness.Show();
            await playerBusiness.PlayVideoAsync(Item, false);
        }