private void ShowInfo() { try { GUIWindow fWindow = GUIWindowManager.GetWindow(Utils.ActiveWindow); int FocusControlID = fWindow.GetFocusControlId(); int idx = -1; if (ControlIDPlays.Contains(FocusControlID)) { idx = ControlIDPlays.IndexOf(FocusControlID) + 1; } // // CurrentFacade.Facade = Utils.GetLatestsFacade(CurrentFacade.ControlID); if (CurrentFacade.Facade != null && CurrentFacade.Facade.Focus && CurrentFacade.Facade.SelectedListItem != null) { idx = CurrentFacade.Facade.SelectedListItem.ItemId; } // if (idx > 0) { IMDBMovie movie = (IMDBMovie)latestMyVideosForPlay[idx]; // Open video info screen GUIVideoInfo videoInfo = (GUIVideoInfo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIDEO_INFO); videoInfo.Movie = movie; GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_VIDEO_INFO); } } catch (Exception ex) { logger.Error("ShowInfo: " + ex.ToString()); } }
internal bool PlayMovie(GUIWindow fWindow) { try { int FocusControlID = fWindow.GetFocusControlId(); if (ControlIDPlays.Contains(FocusControlID)) { PlayMovie(ControlIDPlays.IndexOf(FocusControlID) + 1); return(true); } // // CurrentFacade.Facade = Utils.GetLatestsFacade(CurrentFacade.ControlID); if (CurrentFacade.Facade != null && CurrentFacade.Facade.Focus && CurrentFacade.Facade.SelectedListItem != null) { PlayMovie(CurrentFacade.Facade.SelectedListItem.ItemId); return(true); } } catch (Exception ex) { logger.Error("Unable to play video! " + ex.ToString()); return(true); } return(false); }
private void ShowInfo() { try { GUIWindow fWindow = GUIWindowManager.GetWindow(Utils.ActiveWindow); int FocusControlID = fWindow.GetFocusControlId(); int idx = -1; if (ControlIDPlays.Contains(FocusControlID)) { idx = ControlIDPlays.IndexOf(FocusControlID); } // // CurrentFacade.Facade = Utils.GetLatestsFacade(CurrentFacade.ControlID); if (CurrentFacade.Facade != null && CurrentFacade.Facade.Focus && CurrentFacade.Facade.SelectedListItem != null) { idx = CurrentFacade.Facade.SelectedListItem.ItemId - 1; } // if (idx >= 0) { string sHyp = "movieid:" + latestMovies[idx].Id; GUIWindowManager.ActivateWindow(96742, sHyp, false); } } catch (Exception ex) { logger.Error("ShowInfo: " + ex.ToString()); } }
internal void InfoPictures() { try { GUIWindow fWindow = GUIWindowManager.GetWindow(Utils.ActiveWindow); int FocusControlID = fWindow.GetFocusControlId(); int idx = -1; if (ControlIDPlays.Contains(FocusControlID)) { idx = ControlIDPlays.IndexOf(FocusControlID) + 1; } // // CurrentFacade.Facade = Utils.GetLatestsFacade(CurrentFacade.ControlID); if (CurrentFacade.Facade != null && CurrentFacade.Facade.Focus && CurrentFacade.Facade.SelectedListItem != null) { idx = CurrentFacade.Facade.SelectedListItem.ItemId; } // if (idx > 0) { GUIDialogExif exifDialog = (GUIDialogExif)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_EXIF); // Needed to set GUIDialogExif exifDialog.Restore(); exifDialog = (GUIDialogExif)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_EXIF); exifDialog.FileName = latestPicturesFiles[idx].ToString(); exifDialog.DoModal(fWindow.GetID); exifDialog.Restore(); } } catch (Exception ex) { logger.Error("Unable to Info picture! " + ex.ToString()); } }
internal void UpdateImageTimer(GUIWindow fWindow, Object stateInfo, ElapsedEventArgs e) { if (Utils.LatestMyVideos) { try { if (fWindow.GetFocusControlId() == CurrentFacade.ControlID) { UpdateSelectedImageProperties(); NeedCleanup = true; } else { if (NeedCleanup && NeedCleanupCount >= 5) { Utils.SetProperty("#latestMediaHandler.myvideo.selected.fanart1", " "); Utils.SetProperty("#latestMediaHandler.myvideo.selected.fanart2", " "); Utils.UnLoadImages(ref images); ShowFanart = 1; CurrentFacade.SelectedImage = -1; NeedCleanup = false; NeedCleanupCount = 0; } else if (NeedCleanup && NeedCleanupCount == 0) { Utils.SetProperty("#latestMediaHandler.myvideo.selected.showfanart1", "false"); Utils.SetProperty("#latestMediaHandler.myvideo.selected.showfanart2", "false"); NeedCleanupCount++; } else if (NeedCleanup) { NeedCleanupCount++; } } } catch (Exception ex) { logger.Error("UpdateImageTimer (MyVideo): " + ex.ToString()); } } }
internal bool PlayRecording(GUIWindow fWindow, ref MediaPortal.GUI.Library.Action action) { try { int idx = -1; int FocusControlID = fWindow.GetFocusControlId(); if (ControlIDPlays.Contains(FocusControlID)) { idx = ControlIDPlays.IndexOf(FocusControlID) + 1; } // // CurrentFacade.Facade = Utils.GetLatestsFacade(CurrentFacade.ControlID); if (CurrentFacade.Facade != null && CurrentFacade.Facade.Focus && CurrentFacade.Facade.SelectedListItem != null) { idx = CurrentFacade.Facade.SelectedListItem.ItemId; } // if (idx >= 0) { if (Utils.UsedArgus) { action.wID = MediaPortal.GUI.Library.Action.ActionType.ACTION_KEY_PRESSED; Largusrh.PlayRecording(idx); } else { Ltvrh.PlayRecording(idx); } return(true); } } catch (Exception ex) { logger.Error("Unable to play recording! " + ex.ToString()); return(true); } return(false); }
internal void UpdateImageTimer(GUIWindow fWindow, Object stateInfo, ElapsedEventArgs e) { if (Utils.LatestTVRecordings) { try { bool showRedDot = false; if (Utils.UsedArgus) { showRedDot = Largusrh.GetRecordingRedDot(); } else { showRedDot = Ltvrh.GetRecordingRedDot(); } if (showRedDot != TVRecordingShowRedDot) { TVRecordingShowRedDot = showRedDot; Utils.SetProperty("#latestMediaHandler.tvrecordings.reddot", TVRecordingShowRedDot ? "true" : "false"); logger.Debug("TV Recordings reddot changes detected: Refreshing Active/Schedulled."); UpdateActiveRecordingsThread(); } } catch (Exception ex) { logger.Error("UpdateImageTimer/RedDot: " + ex.ToString()); } try { if (fWindow.GetFocusControlId() == CurrentFacade.ControlID) { if (Utils.UsedArgus) { Largusrh.UpdateSelectedImageProperties(); } else { Ltvrh.UpdateSelectedImageProperties(); } NeedCleanup = true; } else { if (NeedCleanup && NeedCleanupCount >= 5) { Utils.SetProperty("#latestMediaHandler.tvrecordings.selected.fanart1", " "); Utils.SetProperty("#latestMediaHandler.tvrecordings.selected.fanart2", " "); if (Utils.UsedArgus) { Utils.UnLoadImages(ref Largusrh.images); } else { Utils.UnLoadImages(ref Ltvrh.images); } ShowFanart = 1; CurrentFacade.SelectedItem = -1; CurrentFacade.SelectedImage = -1; NeedCleanup = false; NeedCleanupCount = 0; } else if (NeedCleanup && NeedCleanupCount == 0) { Utils.SetProperty("#latestMediaHandler.tvrecordings.selected.showfanart1", "false"); Utils.SetProperty("#latestMediaHandler.tvrecordings.selected.showfanart2", "false"); NeedCleanupCount++; } else if (NeedCleanup) { NeedCleanupCount++; } } } catch (Exception ex) { logger.Error("UpdateImageTimer (recordings): " + ex.ToString()); } } }