Esempio n. 1
0
        private void Update()
        {
            try
            {
                if (listExifProperties != null && !listExifProperties.IsVisible)
                {
                    listExifProperties.IsVisible = true;

                    if (!listExifProperties.IsEnabled)
                    {
                        GUIControl.EnableControl(GetID, listExifProperties.GetID);
                    }

                    GUIControl.SelectControl(GetID, listExifProperties.GetID);
                    GUIControl.FocusControl(GetID, listExifProperties.GetID);
                    GUIPropertyManager.SetProperty("#itemcount", Util.Utils.GetObjectCountLabel(listExifProperties.Count));
                    listExifProperties.SelectedListItemIndex = _currentSelectedItem;
                    SelectItem();
                }

                if (imgPicture != null)
                {
                    imgPicture.Rotation = PictureDatabase.GetRotation(_currentPicture);
                    imgPicture.Dispose();
                    imgPicture.AllocResources();
                }

                GUIPropertyManager.SetProperty("#pictures.exif.picture", _currentPicture);
            }
            catch (Exception ex)
            {
                Log.Error("GUIPictureExif Update controls Error: {1}", ex.Message);
            }
        }
Esempio n. 2
0
        protected override void OnPageDestroy(int newWindowId)
        {
            ImageChangeTimer.Stop();

            if (VUMeterTimer != null)
            {
                VUMeterTimer.Stop();
                VUMeterTimer = null;
            }

            if (ProgramChangeTimer != null)
            {
                ProgramChangeTimer.Stop();
                ProgramChangeTimer = null;
            }

            if (ImgCoverArt != null)
            {
                ImgCoverArt.Dispose();
            }

            GC.Collect();
            ControlsInitialized = false;

            BassMusicPlayer.Player.InternetStreamSongChanged -= OnInternetStreamSongChanged;

            base.OnPageDestroy(newWindowId);
        }
Esempio n. 3
0
        protected override void OnPageDestroy(int newWindowId)
        {
            ImageChangeTimer.Stop();

            if (VUMeterTimer != null)
            {
                VUMeterTimer.Stop();
                VUMeterTimer = null;
            }

            if (ImgCoverArt != null)
            {
                ImgCoverArt.Dispose();
            }

            GC.Collect();
            ControlsInitialized = false;

            // Make sure we clear any images we added so we revert back the coverart image
            ClearVisualizationImages();

            BassMusicPlayer.Player.InternetStreamSongChanged -= OnInternetStreamSongChanged;

            base.OnPageDestroy(newWindowId);
        }
        private void Update()
        {
            if (currentActor == null)
            {
                return;
            }

            //cast->image
            if (viewmode == ViewMode.Movies)
            {
                tbPlotArea.IsVisible  = false;
                tbTextArea.IsVisible  = true;
                imgCoverArt.IsVisible = true;
                btnBiography.Selected = false;
                btnMovies.Selected    = true;
            }
            //cast->plot
            if (viewmode == ViewMode.Biography)
            {
                tbPlotArea.IsVisible  = true;
                tbTextArea.IsVisible  = false;
                imgCoverArt.IsVisible = true;
                btnBiography.Selected = true;
                btnMovies.Selected    = false;
            }
            GUIPropertyManager.SetProperty("#Actor.Name", currentActor.Name);
            GUIPropertyManager.SetProperty("#Actor.DateOfBirth", currentActor.DateOfBirth);
            GUIPropertyManager.SetProperty("#Actor.PlaceOfBirth", currentActor.PlaceOfBirth);
            string biography = currentActor.Biography;

            if ((biography == string.Empty) || (biography == Strings.Unknown))
            {
                biography = currentActor.MiniBiography;
                if (biography == Strings.Unknown)
                {
                    biography = "";
                }
            }
            GUIPropertyManager.SetProperty("#Actor.Biography", biography);
            string movies = "";

            for (int i = 0; i < currentActor.Count; ++i)
            {
                string line = String.Format("{0}. {1} ({2})\n            {3}\n", i + 1, currentActor[i].MovieTitle,
                                            currentActor[i].Year, currentActor[i].Role);
                movies += line;
            }
            GUIPropertyManager.SetProperty("#Actor.Movies", movies);

            string largeCoverArtImage = Util.Utils.GetLargeCoverArtName(Thumbs.MovieActors, currentActor.Name);

            if (imgCoverArt != null)
            {
                imgCoverArt.Dispose();
                imgCoverArt.SetFileName(largeCoverArtImage);
                imgCoverArt.AllocResources();
            }
        }
Esempio n. 5
0
        // Just because of compatibility with old skins (not needed in the future)
        private void SetOldProperties()
        {
            string movies = string.Empty;

            for (int i = 0; i < _currentActor.Count; ++i)
            {
                string line = String.Format("{0}. {1} ({2})\n            {3}\n", i + 1, _currentActor[i].MovieTitle,
                                            _currentActor[i].Year, _currentActor[i].Role);
                movies += line;
            }
            GUIPropertyManager.SetProperty("#Actor.Movies", movies);

            string largeCoverArtImage = Util.Utils.GetLargeCoverArtName(Thumbs.MovieActors, _currentActor.ID.ToString());

            if (imgCoverArt != null)
            {
                imgCoverArt.Dispose();
                imgCoverArt.SetFileName(largeCoverArtImage);
                imgCoverArt.AllocResources();
            }
            Update();
        }
Esempio n. 6
0
        private void ReleaseResources()
        {
            if (listActorMovies != null)
            {
                listActorMovies.Clear();
            }

            if (imgCoverArt != null)
            {
                imgCoverArt.Dispose();
            }

            if (imgMovieCover != null)
            {
                imgMovieCover.Dispose();
            }
        }
        public void Dispose()
        {
            PlayButtom.OnClick   -= OnPlayClick;
            DeleteButtom.OnClick -= OnDeleteButtomClick;

            for (int i = 0; i < charGuiItems.Count; i++)
            {
                charGuiItems[i].OnClick -= OnCharFocus;
                charGuiItems[i].Dispose();
            }

            charGuiItems.Clear();

            Background.Dispose();
            DisconnectButtom.Dispose();

            CharListBack.Dispose();
            PlayButtom.Dispose();
            DeleteButtom.Dispose();
        }
        public void Dispose()
        {
            _Client = null;

            Logo.Dispose();
            imgteste.Dispose();

            debugText.Dispose();
            VersionText.Dispose();
            DarkcomsoftCopy.Dispose();

            PlaySingleButtom.OnClick -= PlayButtomClick;
            PlaySingleButtom.Dispose();

            PlayMultiButtom.OnClick -= PlayMButtomClick;
            PlayMultiButtom.Dispose();

            QuitButtom.OnClick -= QuitButtomClick;
            QuitButtom.Dispose();

            connectionBackgorund.Dispose();
            connectionTextInfo.Dispose();
        }
 public void SetImage(string filename)
 {
     imgLogo.Dispose();
     imgLogo.SetFileName(filename);
     imgLogo.AllocResources();
 }
        private void Update()
        {
            if (currentMovie == null)
            {
                return;
            }

            // Cast
            if (viewmode == ViewMode.Cast)
            {
                if (tbPlotArea != null)
                {
                    tbPlotArea.IsVisible = false;
                }
                if (tbReviwArea != null)
                {
                    tbReviwArea.IsVisible = false;
                }
                if (tbTextArea != null)
                {
                    tbTextArea.IsVisible = true;
                }
                if (imgCoverArt != null)
                {
                    imgCoverArt.IsVisible = true;
                }
                if (lblDisc != null)
                {
                    lblDisc.IsVisible = false;
                }
                if (spinDisc != null)
                {
                    spinDisc.IsVisible = false;
                }
                if (btnPlot != null)
                {
                    btnPlot.Selected = false;
                }
                if (btnReview != null)
                {
                    btnReview.Selected = false;
                }
                if (btnCast != null)
                {
                    btnCast.Selected = true;
                }
            }
            // Plot
            if (viewmode == ViewMode.Plot)
            {
                if (tbPlotArea != null)
                {
                    tbPlotArea.IsVisible = true;
                }
                if (tbReviwArea != null)
                {
                    tbReviwArea.IsVisible = false;
                }
                if (tbTextArea != null)
                {
                    tbTextArea.IsVisible = false;
                }
                if (imgCoverArt != null)
                {
                    imgCoverArt.IsVisible = true;
                }
                if (lblDisc != null)
                {
                    lblDisc.IsVisible = true;
                }
                if (spinDisc != null)
                {
                    spinDisc.IsVisible = true;
                }
                if (btnPlot != null)
                {
                    btnPlot.Selected = true;
                }
                if (btnReview != null)
                {
                    btnReview.Selected = false;
                }
                if (btnCast != null)
                {
                    btnCast.Selected = false;
                }
            }
            // Review
            if (viewmode == ViewMode.Review)
            {
                if (tbPlotArea != null)
                {
                    tbPlotArea.IsVisible = false;
                }
                if (tbReviwArea != null)
                {
                    tbReviwArea.IsVisible = true;
                }
                if (tbTextArea != null)
                {
                    tbTextArea.IsVisible = false;
                }
                if (imgCoverArt != null)
                {
                    imgCoverArt.IsVisible = true;
                }
                if (lblDisc != null)
                {
                    lblDisc.IsVisible = true;
                }
                if (spinDisc != null)
                {
                    spinDisc.IsVisible = true;
                }
                if (btnPlot != null)
                {
                    btnPlot.Selected = false;
                }
                if (btnReview != null)
                {
                    btnReview.Selected = true;
                }
                if (btnCast != null)
                {
                    btnCast.Selected = false;
                }
            }

            btnWatched.Selected = (currentMovie.Watched != 0);
            currentMovie.SetProperties(false);

            if (imgCoverArt != null)
            {
                imgCoverArt.Dispose();
                imgCoverArt.AllocResources();
            }
        }