Esempio n. 1
0
 /// <summary>
 /// Constructor which initialises the external osd library handler
 /// </summary>
 /// <param name="player">Instance of external player</param>
 public ExternalOSDLibrary(MPlayerExtPlayer player)
 {
     _showingCacheStatus = false;
     _internalOSDHandler = new InternalOSDHandler(player, false);
     using (new WaitCursor())
     {
         Thread thread = new Thread(OsdGetInstance);
         thread.Start();
         while (thread.IsAlive)
         {
             GUIWindowManager.Process();
             Thread.Sleep(100);
         }
     }
     _osd.ShowInit(LocalizeStrings.Get((int)LocalizedMessages.Initializing));
 }
Esempio n. 2
0
        /// <summary>
        /// Handles the page load event and initializes the plugin
        /// </summary>
        protected override void OnPageLoad()
        {
            base.OnPageLoad();
            GUIVideoOverlay videoOverlay = (GUIVideoOverlay)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_OVERLAY);

            if ((videoOverlay != null) && (videoOverlay.Focused))
            {
                videoOverlay.Focused = false;
            }

            LoadDirectory(_virtualPath);
            if (btnSortBy != null)
            {
                btnSortBy.SortChanged += SortChanged;
            }
            CurrentSortAsc = true;
            GUIControl.SetControlLabel(GetID, btnPlayStream.GetID, LocalizeStrings.Get((int)LocalizedMessages.PlayStream));
            GUIControl.SetControlLabel(GetID, btnPlayDisc.GetID, LocalizeStrings.Get((int)LocalizedMessages.PlayDisc));
            GUIControl.SetControlLabel(GetID, btnDelete.GetID, LocalizeStrings.Get((int)LocalizedMessages.Delete));

            OnSort();
            SwitchView();
            UpdateButtonStates();
        }
Esempio n. 3
0
 /// <summary>
 /// Shows the new status of the subtitles
 /// </summary>
 /// <param name="enabled">New status of the subtitles</param>
 public void ShowSubtitleAcDeActivated(bool enabled)
 {
     _osd.ShowAlternativeOSD(LocalizeStrings.Get((int)LocalizedMessages.Subtitles), !enabled);
 }
Esempio n. 4
0
 /// <summary>
 /// Shows the new subtitle delay
 /// </summary>
 /// <param name="newSubtitleDelay">Value of the new subtitle delay</param>
 public void ShowSubtitleDelayChanged(String newSubtitleDelay)
 {
     _osd.ShowAlternativeOSD(LocalizeStrings.Get((int)LocalizedMessages.SubtitleDelay) + ": " + newSubtitleDelay, false);
 }
Esempio n. 5
0
 /// <summary>
 /// Shows the new subtitle position
 /// </summary>
 /// <param name="newSubtitlePosition">Value of the new subtitle position</param>
 public void ShowSubtitlePositionChanged(String newSubtitlePosition)
 {
     _osd.ShowAlternativeOSD(LocalizeStrings.Get((int)LocalizedMessages.SubtitlePosition) + ": " + newSubtitlePosition, false);
 }
Esempio n. 6
0
 /// <summary>
 /// Shows the new subtitle language
 /// </summary>
 /// <param name="newSubtitleLanguage">Name of the new subtitle langauge</param>
 public void ShowSubtitleChanged(String newSubtitleLanguage)
 {
     _osd.ShowAlternativeOSD(LocalizeStrings.Get((int)LocalizedMessages.Subtitles) + ": " + newSubtitleLanguage, false);
 }
Esempio n. 7
0
 /// <summary>
 /// Sends a localized OSD command with a localized value to the mplayer proccess
 /// </summary>
 /// <param name="message">Message type</param>
 /// <param name="value">Value of the message</param>
 private void SendOSDText(LocalizedMessages message, LocalizedMessages value)
 {
     SendOSDText(LocalizeStrings.Get((int)message) + ": " + LocalizeStrings.Get((int)value));
 }
Esempio n. 8
0
 /// <summary>
 /// Sends a localized OSD command with a specific duration to the mplayer proccess
 /// </summary>
 /// <param name="message">Message type</param>
 private void SendOSDText(LocalizedMessages message)
 {
     SendOSDText(LocalizeStrings.Get((int)message));
 }