Exemplo n.º 1
0
        protected override void OnPageLoad()
        {
            int previousWindow = GUIWindowManager.GetPreviousActiveWindow();

            // Reset parameters if previous window is not one of video windows
            if (!GUIVideoFiles.IsVideoWindow(previousWindow))
            {
                ageConfirmed = false;
                currentPin   = 0;
                currentProtectedShare.Clear();
                _currentLevel = 0;
            }

            string view = VideoState.View;

            if (view == string.Empty)
            {
                view = ((ViewDefinition)handler.Views[0]).Name;
            }

            handler.CurrentView = view;
            // Resume view lvl position (back from VideoInfo window)
            handler.CurrentLevel = _currentLevel;

            base.OnPageLoad();

            LoadDirectory(currentFolder);
            GetProtectedShares(ref protectedShares);

            SetPinLockSkinProperties();
        }
Exemplo n.º 2
0
        protected override void OnPageDestroy(int newWindowId)
        {
            SaveSettings();

            // Save view
            using (Profile.Settings xmlwriter = new Profile.MPSettings())
            {
                // Save only MyVideos window views
                if (GUIVideoFiles.IsVideoWindow(VideoState.StartWindow))
                {
                    xmlwriter.SetValue("movies", "startWindow", VideoState.StartWindow.ToString());
                    xmlwriter.SetValue("movies", "startview", VideoState.View);
                }
            }

            m_bPlaylistsLayout = false;

            base.OnPageDestroy(newWindowId);
        }