Example #1
0
 private void IncrementPlayCount()
 {
     OMLApplication.ExecuteSafe(delegate
     {
         TitleCollectionManager.IncrementWatchedCount(this.TitleObject);
     });
 }
Example #2
0
 private void ClearWatchedCount()
 {
     OMLApplication.ExecuteSafe(delegate
     {
         TitleCollectionManager.ClearWatchedCount(this.TitleObject);
     });
 }
Example #3
0
        static public void Transport_PropertyChanged(IPropertyObject sender, string property)
        {
            OMLApplication.ExecuteSafe(delegate
            {
                Microsoft.MediaCenter.MediaTransport t = (Microsoft.MediaCenter.MediaTransport)sender;
                OMLApplication.DebugLine("[AppleTrailers] Transport_PropertyChanged: movie {0} property {1} playrate {2} state {3} pos {4}", OMLApplication.Current.NowPlayingMovieName, property, t.PlayRate, t.PlayState.ToString(), t.Position.ToString());
                if (property == "PlayState")
                {
                    OMLApplication.Current.NowPlayingStatus = t.PlayState;
                    OMLApplication.DebugLine("[AppleTrailers] MoviePlayerFactory.Transport_PropertyChanged: movie {0} state {1}", OMLApplication.Current.NowPlayingMovieName, t.PlayState.ToString());

                    if (t.PlayState == Microsoft.MediaCenter.PlayState.Finished || t.PlayState == Microsoft.MediaCenter.PlayState.Stopped)
                    {
                        OMLApplication.DebugLine("[AppleTrailers] Playstate is stopped, moving to previous page");
                        OMLApplication.Current.Session.BackPage();
                    }
                }
            });
        }