Ejemplo n.º 1
0
 private void ReturnToPreviousWindow()
 {
     if (GUIWindowManager.HasPreviousWindow())
     {
         GUIWindowManager.ShowPreviousWindow();
     }
     else
     {
         GUIWindowManager.CloseCurrentWindow();
     }
 }
Ejemplo n.º 2
0
        protected override void OnPageLoad()
        {
            base.OnPageLoad();
            _forceRefreshAll = false;

            if (_currentActor == null)
            {
                if (GUIWindowManager.HasPreviousWindow())
                {
                    GUIWindowManager.ShowPreviousWindow();
                }
                else
                {
                    GUIWindowManager.CloseCurrentWindow();
                }
                return;
            }

            //_internalGrabber.LoadScript();
            _currentActor.SetProperties();
            string biography = _currentActor.Biography;

            if (biography == string.Empty || biography == Strings.Unknown)
            {
                biography = "";
                _viewmode = ViewMode.Movies;
            }
            else
            {
                _viewmode = ViewMode.Biography;
            }

            if (listActorMovies != null && listActorMovies.Count == 0)
            {
                SetNewproperties();
            }
            else
            {
                SetOldProperties();
            }
        }
Ejemplo n.º 3
0
        protected override void OnPageLoad()
        {
            base.OnPageLoad();

            this._isOverlayAllowed = true;
            GUIVideoOverlay videoOverlay = (GUIVideoOverlay)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_OVERLAY);

            if ((videoOverlay != null) && (videoOverlay.Focused))
            {
                videoOverlay.Focused = false;
            }
            // GoBack bug fix (corrupted video info)
            if (currentMovie == null)
            {
                if (GUIWindowManager.HasPreviousWindow())
                {
                    GUIWindowManager.ShowPreviousWindow();
                }
                else
                {
                    GUIWindowManager.CloseCurrentWindow();
                }
                return;
            }
            // Default picture
            imdbCoverArtUrl = currentMovie.ThumbURL;
            coverArtUrls    = new string[1];
            coverArtUrls[0] = imdbCoverArtUrl;

            ResetSpinControl();
            spinDisc.UpDownType = GUISpinControl.SpinType.SPIN_CONTROL_TYPE_DISC_NUMBER;
            spinDisc.Reset();
            viewmode = ViewMode.Plot;
            spinDisc.AddLabel("HD", 0);
            for (int i = 0; i < 1000; ++i)
            {
                string description = String.Format("DVD#{0:000}", i);
                spinDisc.AddLabel(description, 0);
            }

            spinDisc.IsVisible = false;
            spinDisc.Disabled  = true;
            int iItem = 0;

            if (Util.Utils.IsDVD(currentMovie.Path))
            {
                spinDisc.IsVisible = true;
                spinDisc.Disabled  = false;
                string szNumber = string.Empty;
                int    iPos     = 0;
                bool   bNumber  = false;
                for (int i = 0; i < currentMovie.DVDLabel.Length; ++i)
                {
                    char kar = currentMovie.DVDLabel[i];
                    if (Char.IsDigit(kar))
                    {
                        szNumber += kar;
                        iPos++;
                        bNumber = true;
                    }
                    else
                    {
                        if (bNumber)
                        {
                            break;
                        }
                    }
                }
                int iDVD = 0;
                if (szNumber.Length > 0)
                {
                    int x = 0;
                    while (szNumber[x] == '0' && x + 1 < szNumber.Length)
                    {
                        x++;
                    }
                    if (x < szNumber.Length)
                    {
                        szNumber = szNumber.Substring(x);
                        iDVD     = Int32.Parse(szNumber);
                        if (iDVD < 0 && iDVD >= 1000)
                        {
                            iDVD = -1;
                        }
                        else
                        {
                            iDVD++;
                        }
                    }
                }
                if (iDVD <= 0)
                {
                    iDVD = 0;
                }
                iItem = iDVD;
                //0=HD
                //1=DVD#000
                //2=DVD#001
                GUIControl.SelectItemControl(GetID, spinDisc.GetID, iItem);
            }
            Refresh(false);
            Update();

            SearchImages();
        }