예제 #1
0
 /// <summary>
 /// Get the internal dialog object from the given GUIDialogWindow
 /// </summary>
 /// <param name="dialog">Dialog</param>
 /// <returns>WifiRemote MP Dialog</returns>
 public static MpDialog GetDialog(GUIDialogWindow dialog)
 {
     if (dialog.GetType().Equals(typeof(GUIDialogOK)))
     {
         return(GetDialogOk());
     }
     else if (dialog.GetType().Equals(typeof(GUIDialogYesNo)))
     {
         return(GetDialogYesNo());
     }
     else if (dialog.GetType().Equals(typeof(GUIDialogMenu)))
     {
         return(GetDialogMenu());
     }
     else if (dialog.GetType().Equals(typeof(GUIDialogNotify)))
     {
         return(GetDialogNotify());
     }
     else if (dialog.GetType().Equals(typeof(GUIDialogProgress)))
     {
         return(GetDialogProgress());
     }
     else if (dialog.GetType().Equals(typeof(GUIDialogSetRating)))
     {
         return(GetDialogRating());
     }
     else if (dialog.GetType().Equals(typeof(GUIDialogSelect)))
     {
         return(GetDialogSelect());
     }
     if (WifiRemote.IsAvailableTVSeries)
     {
         if (TVSeriesHelper.IsTvSeriesRatingDialog(dialog))
         {
             return(GetDialogMpTvSeriesRating());
         }
         if (TVSeriesHelper.IsTvSeriesPinDialog(dialog))
         {
             return(GetDialogMpTvSeriesPin());
         }
     }
     if (WifiRemote.IsAvailableMovingPictures)
     {
         if (MovingPicturesHelper.IsMovingPictureRatingDialog(dialog))
         {
             return(GetDialogMovingPicturesRating());
         }
         else if (MovingPicturesHelper.IsMovingPicturePinDialog(dialog))
         {
             return(GetDialogMovingPicturesPin());
         }
     }
     if (WifiRemote.IsAvailableTrakt)
     {
         if (TraktHelper.IsTraktRatingDialog(dialog))
         {
             return(GetDialogTraktRating());
         }
     }
     return(null);
 }