Exemplo n.º 1
0
 public void PlayDiskWithOptions()
 {
     OMLApplication.ExecuteSafe(delegate
     {
         // Play the Selected Disk
         _movieDetails.PlayMovie();
         _playClicked = false; // I use the private variable because I don't want to send an event to the MCML page
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// Handles the play or plause/pause button when click from the top level menu to immediately
        /// play disk 1.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void QuickPlayClicked(object sender, EventArgs e)
        {
            OMLApplication.ExecuteSafe(delegate
            {
                // quick play is only allowed if we're a movie item
                // this needs a cast here because in MCML movieitems are used
                // as gallery items
                MovieItem movie = this as MovieItem;

                // make sure we have a disk to quick play
                if (movie != null &&
                    movie.Disks != null &&
                    movie.Disks.Count > 0 &&
                    movie.TitleObject != null)
                {
                    // play the first disk
                    movie.TitleObject.SelectedDisk = movie.Disks[0];
                    movie.PlayMovie();
                }
            });
        }