Ejemplo n.º 1
0
        private void DisplayCorrectPage()
        {
            foreach (NotebookPage p in NotebookPages)
            {
                p.Visible = false;
            }

            if (NotebookPages.Count == 0)
            {
                SelectedIndex = -1;
                return;
            }

            if (NavigatorInterface.SelectedIndex == -1)
            {
                return;
            }

            SelectedPage.BringToFront();
            SelectedPage.Visible = true;

            SelectedPage.BackColor = Navigator.PageBackColor;

            Invalidate();
        }
Ejemplo n.º 2
0
 protected void OnGUI()
 {
     TreeView.DefaultStyles.label.richText = true;
     //DefaultStyles.label.richText = true;
     GUILayout.Space(5);
     GUILayout.BeginHorizontal();
     {
         m_SelectedPage = (SelectedPage)GUILayout.Toolbar((int)m_SelectedPage, new string[] { Language.ResourceMgr, Language.BuildAssetToBundles },
                                                          GUILayout.Height(40));
     }
     if (old != m_SelectedPage)
     {
         old = m_SelectedPage;
         OnEnable();
     }
     GUILayout.EndHorizontal();
     if (m_SelectedPage == SelectedPage.ResGroup)
     {
         m_ManageTab.OnGUI(GetSubWindowArea());
     }
     else
     {
         mAssetBundleEditor.OnGUI(GetSubWindowArea());
         //base.OnGUI();
     }
 }
Ejemplo n.º 3
0
 private void BtnAccept_Click(object sender, EventArgs e)
 {
     if (SelectedPage != null && typeof(IAcceptListener).IsAssignableFrom(SelectedPage.GetType()))
     {
         ((IAcceptListener)SelectedPage).OnPageAccept();
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Updates this MenuUI.
 /// </summary>
 public void Update(double deltaTime, InputManager input)
 {
     if (State == MenuUIState.Open)
     {
         SelectedPage.UpdateElements(deltaTime, input);
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Switches to another page with a transition.
        /// You can check result_value.Current == null to see when the switch is done.
        /// This function returns null if:
        /// * a transition is in progress
        /// * the page is the same as the current page
        /// * the menu is closed
        /// In the case of the menu being closed, the pages will be switched but no transition will occur.
        /// </summary>
        /// <param name="nextPageID">The page to switch to.</param>
        /// <param name="goingBack">If the transition should go to the left rather than the right.</param>
        public IEnumerator <ICoroutineOperation> SwitchPage(string nextPageID, bool goingBack = false)
        {
            if (State == MenuUIState.Closed || !UseTransitions)
            {
                SelectedPage.OnPageLeave(nextPageID);
                string lastID = SelectedPageID;
                SelectedPageID = nextPageID;
                SelectedPage.OnPageEnter(lastID);
                return(null);
            }

            if (nextPageID == SelectedPageID || State == MenuUIState.Transitioning)
            {
                return(null);
            }

            IEnumerator <ICoroutineOperation> switchOperation = SwitchCoroutine();

            State = MenuUIState.Transitioning;
            _pageTransition.TweenTo(0, TweenEaseType.Linear, 0);
            _pageTransitionGoingBack = goingBack;
            _nextPageID = nextPageID;

            if (!goingBack)
            {
                _pages[_nextPageID].ResetSelectedElement();
            }

            Parent.Coroutine.AddExisting(switchOperation);
            return(switchOperation);
        }
Ejemplo n.º 6
0
 private async Task OnSelectPage(PagingLink link)
 {
     if (link.PageNumber != PaginationData.CurrentPage && link.IsEnabled)
     {
         PaginationData.CurrentPage = link.PageNumber;
         await SelectedPage.InvokeAsync(link.PageNumber);
     }
 }
Ejemplo n.º 7
0
 private async Task OnSelectedPage(PagingLink link)
 {
     if (!link.Enabled)
     {
         return;
     }
     CurrentPage = link.Page;
     await SelectedPage.InvokeAsync();
 }
Ejemplo n.º 8
0
 public void GoPrevious()
 {
     if (CanGoPrevious())
     {
         SelectedPage.Leave(false);
         SelectedPage.IsDone = false;
         SelectedPageIndex--;
         SelectedPage.Enter(false);
     }
 }
Ejemplo n.º 9
0
        private async Task OnSelectedPage(PagingLink link)
        {
            if (link.Page == MetaData.CurrentPage || !link.Enabled)
            {
                return;
            }

            MetaData.CurrentPage = link.Page;
            await SelectedPage.InvokeAsync(link.Page);
        }
Ejemplo n.º 10
0
 public void GoNext()
 {
     if (CanGoNext())
     {
         SelectedPage.Leave(true);
         SelectedPage.IsDone = true;
         SelectedPageIndex++;
         SelectedPage.Enter(true);
     }
 }
Ejemplo n.º 11
0
        private async void HandleTransactionChanged(object sender, TransactionEventArgs e)
        {
            var transaction = e.Transaction;

            if ((PortfolioDateRange.FromDate == Date.MinValue) ||
                !PortfolioDateRange.Contains(transaction.TransactionDate) ||
                !OwnedStocks.Any(x => x.Value.Id == transaction.Stock.Id))
            {
                await UpdatePortfolioProperties();

                SelectedPage.Activate();
            }
        }
Ejemplo n.º 12
0
        public MenuUI(GameState state, string initialPageId, MenuPage initialPage, bool startClosed)
        {
            Parent = state;
            _pages.Add(initialPageId, initialPage);
            SelectedPageID     = initialPageId;
            initialPage.Parent = this;
            SelectedPage.OnPageEnter("");

            State           = startClosed ? MenuUIState.Closed : MenuUIState.Open;
            _alpha          = new TweenedDouble(state.Game, startClosed ? 0 : 1);
            Area            = new TweenedVector2(state.Game, startClosed ? new Vector2(RecalculateArea(SelectedPageID).X, 7 * 2) : RecalculateArea(SelectedPageID));
            _pageTransition = new TweenedDouble(state.Game, 0);
        }
Ejemplo n.º 13
0
        private IEnumerator <ICoroutineOperation> SwitchCoroutine()
        {
            string lastID = SelectedPageID;

            SelectedPage.OnPageLeave(_nextPageID);
            Area.TweenTo(RecalculateArea(_nextPageID), TweenEaseType.EaseInOutSine, 0.2f);
            _pageTransition.TweenTo(1, TweenEaseType.EaseInOutSine, 0.2f);

            yield return(Wait.Seconds(Parent.Game, 0.2f));

            SelectedPageID = _nextPageID;
            SelectedPage.OnPageEnter(lastID);
            _nextPageID = "";

            State = MenuUIState.Open;
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Draws this MenuUI at the specified position.
        /// </summary>
        /// <param name="position">The position of the top-left corner of the menu.</param>
        /// <param name="batch">The sprite batch to draw with.</param>
        /// <param name="screenSize">The size of the screen.</param>
        public void Draw(Vector2 position, SpriteBatch batch, Vector2 screenSize)
        {
            position = new Vector2((int)position.X, (int)position.Y);

            if (DrawBackground)
            {
                batch.Texture(position, Parent.Assets.Get <Texture2D>("ui/menu_corner.png"), Color.White * _alpha, null, null, 0, null, SpriteEffects.None);
                batch.Texture(position + new Vector2((int)Area.Value.X - 7, 0), Parent.Assets.Get <Texture2D>("ui/menu_corner.png"), Color.White * _alpha, null, null, 0, null, SpriteEffects.FlipHorizontally);
                batch.Texture(position + new Vector2(0, (int)Area.Value.Y - 7), Parent.Assets.Get <Texture2D>("ui/menu_corner.png"), Color.White * _alpha, null, null, 0, null, SpriteEffects.FlipVertically);
                batch.Texture(position + new Vector2((int)Area.Value.X - 7, (int)Area.Value.Y - 7), Parent.Assets.Get <Texture2D>("ui/menu_corner.png"), Color.White * _alpha, null, null, 0, null, SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically);
            }

            Vector2 fillArea = Area.Value - new Vector2(7 * 2, 7 * 2);

            if (DrawBackground)
            {
                batch.Rectangle(new Rectangle((int)position.X + 7, (int)position.Y + 7, (int)fillArea.X, (int)fillArea.Y), new Color(68, 68, 242) * _alpha);
            }

            batch.SamplerState = SamplerState.PointWrap;

            if (DrawBackground)
            {
                batch.Texture(new Rectangle((int)position.X + 7, (int)position.Y, (int)fillArea.X, 7), Parent.Assets.Get <Texture2D>("ui/menu_top.png"), Color.White * _alpha);
                batch.Texture(new Rectangle((int)position.X + 7, (int)position.Y + (int)Area.Value.Y - 7, (int)fillArea.X, 7), Parent.Assets.Get <Texture2D>("ui/menu_top.png"), Color.White * _alpha, null, 0, null, SpriteEffects.FlipVertically);

                batch.Texture(new Rectangle((int)position.X, (int)position.Y + 7, 7, (int)fillArea.Y), Parent.Assets.Get <Texture2D>("ui/menu_side.png"), Color.White * _alpha);
                batch.Texture(new Rectangle((int)position.X + (int)Area.Value.X - 7, (int)position.Y + 7, 7, (int)fillArea.Y), Parent.Assets.Get <Texture2D>("ui/menu_side.png"), Color.White * _alpha, null, 0, null, SpriteEffects.FlipHorizontally);
            }

            batch.Scissor = new Rectangle((int)position.X + 7, (int)position.Y + 7, (int)fillArea.X, (int)fillArea.Y);
            Vector2 transformLT = Vector2.Transform(batch.Scissor.Value.Location.ToVector2(), batch.Transform);
            Vector2 transformRB = Vector2.Transform(new Vector2(batch.Scissor.Value.Right, batch.Scissor.Value.Bottom), batch.Transform);

            batch.Scissor = new Rectangle(
                (int)transformLT.X,
                (int)transformLT.Y,
                (int)(transformRB.X - transformLT.X),
                (int)(transformRB.Y - transformLT.Y));
            if (Area.Value == Area.TargetValue && _alpha.Value == 1)
            {
                SelectedPage.DrawInsideArea(batch,
                                            new Rectangle((int)position.X + 7, (int)position.Y + 7, (int)fillArea.X, (int)fillArea.Y));
            }

            batch.Scissor = null;
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Returns to the previous page.
        /// </summary>
        public virtual void PreviousPage()
        {
            if (this.IsDesignMode())
            {
                int idx = SelectedPageIndex;
                if (idx > 0)
                {
                    SelectedPage = Pages[idx - 1];
                }
                return;
            }

            if (SelectedPage.RollbackPage())
            {
                SelectedPage = pageHistory.Pop();
            }
        }
        /// <summary>
        /// Advances to the specified page.
        /// </summary>
        /// <param name="nextPage">The wizard page to go to next.</param>
        /// <param name="skipCommit">if set to <c>true</c> skip <see cref="WizardPage.Commit"/> event.</param>
        /// <exception cref="ArgumentException">When specifying a value for nextPage, it must already be in the Pages collection.</exception>
        public virtual void NextPage(WizardPage nextPage = null, bool skipCommit = false)
        {
            if (this.IsDesignMode())
            {
                var idx = SelectedPageIndex;
                if (idx < Pages.Count - 1)
                {
                    SelectedPage = Pages[idx + 1];
                }
                return;
            }

            if (skipCommit || SelectedPage.CommitPage())
            {
                if (nextPage != null)
                {
                    if (!Pages.Contains(nextPage))
                    {
                        throw new ArgumentException(@"When specifying a value for nextPage, it must already be in the Pages collection.", nameof(nextPage));
                    }
                    pageHistory.Push(SelectedPage);
                    SelectedPage = nextPage;
                }
                else
                {
                    var selNext = GetNextPage(SelectedPage);

                    // Check for last page
                    if (SelectedPage.IsFinishPage)
                    //|| selNext == null)
                    {
                        OnFinished();
                        return;
                    }

                    pageHistory.Push(SelectedPage);
                    OnPropertyChanged("SelectedPage");
                    OnSelectedPageChanged();
                    UpdateUIDependencies();
                    // Set new SelectedPage value
                    //pageHistory.Push(SelectedPage);
                    //SelectedPage = selNext;
                }
            }
        }
Ejemplo n.º 17
0
 protected void OnGUI()
 {
     GUILayout.Space(5);
     GUILayout.BeginHorizontal();
     {
         m_SelectedPage = (SelectedPage)GUILayout.Toolbar((int)m_SelectedPage, new string[] { "资源管理", "生成" }, GUILayout.Height(40));
     }
     GUILayout.EndHorizontal();
     if (m_SelectedPage == SelectedPage.ResGroup)
     {
         m_ManageTab.OnGUI(GetSubWindowArea());
     }
     else
     {
         AaaetBundleEditor.OnGUI();
         //base.OnGUI();
     }
 }
Ejemplo n.º 18
0
        private void LoadAlbums()
        {
            try
            {
                String url    = string.Format("/{0}/albums", SelectedPage.Split(new [] { "||" }, StringSplitOptions.RemoveEmptyEntries)[0]);
                string token  = SelectedPage.Split(new[] { "||" }, StringSplitOptions.RemoveEmptyEntries)[1];
                var    client = new FacebookClient
                {
                    AccessToken = AccessToken,
                    AppId       = ClientId,
                    AppSecret   = ClientSecret
                };
                Albums = new AsyncObservableCollection <ValuePair>();
                do
                {
                    dynamic albums = client.Get(url, new { limit = 25, offset = 0 });

                    foreach (dynamic data in albums.data)
                    {
                        Albums.Add(new ValuePair()
                        {
                            Value = data.id + "||" + token, Name = data.name
                        });
                    }

                    if (albums.paging != null && !String.IsNullOrEmpty(albums.paging.next))
                    {
                        url = albums.paging.next;
                    }
                    else
                    {
                        url = String.Empty;
                    }
                } while (!String.IsNullOrEmpty(url));
                if (string.IsNullOrEmpty(SelectedAlbum) && Albums.Any())
                {
                    SelectedAlbum = Albums[0].Value;
                }
            }
            catch (Exception)
            {
            }
        }
Ejemplo n.º 19
0
        private void SelectMenuItem()
        {
            if (XmlSettingsClient.Instance.Get <bool>("Startup", "ShowLastSelectedPage"))
            {
                SelectedPage screen = (SelectedPage)XmlSettingsClient.Instance.Get <int>("FullPlayer", "SelectedPage");

                switch (screen)
                {
                case SelectedPage.Artists:
                    this.IsArtistsSelected = true;
                    break;

                case SelectedPage.Genres:
                    this.IsGenresSelected = true;
                    break;

                case SelectedPage.Albums:
                    this.IsAlbumsSelected = true;
                    break;

                case SelectedPage.Tracks:
                    this.IsTracksSelected = true;
                    break;

                case SelectedPage.Playlists:
                    this.IsPlaylistsSelected = true;
                    break;

                case SelectedPage.Recent:
                    this.IsCloudSelected = true;
                    break;

                default:
                    this.IsArtistsSelected = true;
                    break;
                }
            }
            else
            {
                this.IsArtistsSelected = true;
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Advances to the specified page.
        /// </summary>
        /// <param name="nextPage">The wizard page to go to next.</param>
        /// <param name="skipCommit">if set to <c>true</c> skip <see cref="WizardPage.Commit"/> event.</param>
        /// <exception cref="ArgumentException">When specifying a value for nextPage, it must already be in the Pages collection.</exception>
        public virtual void NextPage(WizardPage nextPage, bool skipCommit = false)
        {
            if (this.IsDesignMode())
            {
                int idx = SelectedPageIndex;
                if (idx < Pages.Count - 1)
                {
                    SelectedPage = Pages[idx + 1];
                }
                return;
            }

            if (skipCommit || SelectedPage.CommitPage())
            {
                if (nextPage != null)
                {
                    if (!Pages.Contains(nextPage))
                    {
                        throw new ArgumentException("When specifying a value for nextPage, it must already be in the Pages collection.", "nextPage");
                    }
                    pageHistory.Push(SelectedPage);
                    SelectedPage = nextPage;
                }
                else
                {
                    WizardPage selNext = GetNextPage(SelectedPage);

                    // Check for last page
                    if (SelectedPage.IsFinishPage || selNext == null)
                    {
                        OnFinished();
                        return;
                    }

                    // Set new SelectedPage value
                    pageHistory.Push(SelectedPage);
                    SelectedPage = selNext;
                }
            }
        }
Ejemplo n.º 21
0
        public void Initialize()
        {
            this.container.RegisterType <object, CollectionViewModel>(typeof(CollectionViewModel).FullName);
            this.container.RegisterType <object, Collection>(typeof(Collection).FullName);
            this.container.RegisterType <object, CollectionSubMenu>(typeof(CollectionSubMenu).FullName);
            this.container.RegisterType <object, CollectionAlbumsViewModel>(typeof(CollectionAlbumsViewModel).FullName);
            this.container.RegisterType <object, CollectionAlbums>(typeof(CollectionAlbums).FullName);
            this.container.RegisterType <object, CollectionArtistsViewModel>(typeof(CollectionArtistsViewModel).FullName);
            this.container.RegisterType <object, CollectionArtists>(typeof(CollectionArtists).FullName);
            this.container.RegisterType <object, CollectionGenresViewModel>(typeof(CollectionGenresViewModel).FullName);
            this.container.RegisterType <object, CollectionGenres>(typeof(CollectionGenres).FullName);
            this.container.RegisterType <object, CollectionPlaylistsViewModel>(typeof(CollectionPlaylistsViewModel).FullName);
            this.container.RegisterType <object, CollectionPlaylists>(typeof(CollectionPlaylists).FullName);
            this.container.RegisterType <object, CollectionTracksViewModel>(typeof(CollectionTracksViewModel).FullName);
            this.container.RegisterType <object, CollectionTracks>(typeof(CollectionTracks).FullName);
            this.container.RegisterType <object, CollectionCloudViewModel>(typeof(CollectionCloudViewModel).FullName);
            this.container.RegisterType <object, CollectionCloud>(typeof(CollectionCloud).FullName);
            this.container.RegisterType <object, CollectionTracksColumnsViewModel>(typeof(CollectionTracksColumnsViewModel).FullName);
            this.container.RegisterType <object, CollectionTracksColumns>(typeof(CollectionTracksColumns).FullName);

            this.regionManager.RegisterViewWithRegion(RegionNames.SubMenuRegion, typeof(CollectionSubMenu));
            this.regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(Collection));

            this.regionManager.RegisterViewWithRegion(RegionNames.CollectionPlaybackControlsRegion, typeof(CollectionPlaybackControls));
            this.regionManager.RegisterViewWithRegion(RegionNames.CollectionSpectrumAnalyzerRegion, typeof(SpectrumAnalyzerControl));

            if (XmlSettingsClient.Instance.Get <bool>("Startup", "ShowLastSelectedPage"))
            {
                SelectedPage screen = (SelectedPage)XmlSettingsClient.Instance.Get <int>("FullPlayer", "SelectedPage");

                switch (screen)
                {
                case SelectedPage.Artists:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionArtists));
                    break;

                case SelectedPage.Genres:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionGenres));
                    break;

                case SelectedPage.Albums:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionAlbums));
                    break;

                case SelectedPage.Tracks:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionTracks));
                    break;

                case SelectedPage.Playlists:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionPlaylists));
                    break;

                case SelectedPage.Recent:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionCloud));
                    break;

                default:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionArtists));
                    break;
                }
            }
            else
            {
                this.regionManager.RegisterViewWithRegion(RegionNames.CollectionContentRegion, typeof(CollectionArtists));
            }
        }
Ejemplo n.º 22
0
 public bool IsSelected <TPage>()
     where TPage : IPage
 {
     return(SelectedPage.GetType() == typeof(TPage));
 }
Ejemplo n.º 23
0
        public void Initialize()
        {
            // Register Views and ViewModels with UnityContainer
            this.container.RegisterType <object, CollectionViewModel>(typeof(CollectionViewModel).FullName);
            this.container.RegisterType <object, Collection>(typeof(Collection).FullName);
            this.container.RegisterType <object, CollectionSubMenu>(typeof(CollectionSubMenu).FullName);
            this.container.RegisterType <object, CollectionAlbumsViewModel>(typeof(CollectionAlbumsViewModel).FullName);
            this.container.RegisterType <object, CollectionAlbums>(typeof(CollectionAlbums).FullName);
            this.container.RegisterType <object, CollectionArtistsViewModel>(typeof(CollectionArtistsViewModel).FullName);
            this.container.RegisterType <object, CollectionArtists>(typeof(CollectionArtists).FullName);
            this.container.RegisterType <object, CollectionGenresViewModel>(typeof(CollectionGenresViewModel).FullName);
            this.container.RegisterType <object, CollectionGenres>(typeof(CollectionGenres).FullName);
            this.container.RegisterType <object, CollectionPlaylistsViewModel>(typeof(CollectionPlaylistsViewModel).FullName);
            this.container.RegisterType <object, CollectionPlaylists>(typeof(CollectionPlaylists).FullName);
            this.container.RegisterType <object, CollectionTracksViewModel>(typeof(CollectionTracksViewModel).FullName);
            this.container.RegisterType <object, CollectionTracks>(typeof(CollectionTracks).FullName);
            this.container.RegisterType <object, CollectionFrequentViewModel>(typeof(CollectionFrequentViewModel).FullName);
            this.container.RegisterType <object, CollectionFrequent>(typeof(CollectionFrequent).FullName);
            this.container.RegisterType <object, CollectionTracksColumnsViewModel>(typeof(CollectionTracksColumnsViewModel).FullName);
            this.container.RegisterType <object, CollectionTracksColumns>(typeof(CollectionTracksColumns).FullName);

            // Default View for dynamic Regions
            this.regionManager.RegisterViewWithRegion(RegionNames.SubMenuRegion, typeof(CollectionSubMenu));
            this.regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(Collection));

            if (SettingsClient.Get <bool>("Startup", "ShowLastSelectedPage"))
            {
                SelectedPage page = (SelectedPage)SettingsClient.Get <int>("FullPlayer", "SelectedPage");

                switch (page)
                {
                case SelectedPage.Artists:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionArtists));
                    break;

                case SelectedPage.Genres:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionGenres));
                    break;

                case SelectedPage.Albums:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionAlbums));
                    break;

                case SelectedPage.Tracks:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionTracks));
                    break;

                case SelectedPage.Playlists:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionPlaylists));
                    break;

                case SelectedPage.Recent:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionFrequent));
                    break;

                default:
                    this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionArtists));
                    break;
                }
            }
            else
            {
                this.regionManager.RegisterViewWithRegion(RegionNames.CollectionRegion, typeof(CollectionArtists));
            }
        }
Ejemplo n.º 24
0
 public bool CanGoNext()
 {
     return((SelectedPage != null) && (SelectedPageIndex < Pages.Count - 1) && (SelectedPage.CanGoNext()));
 }
Ejemplo n.º 25
0
 public bool CanGoPrevious()
 {
     return((SelectedPage != null) && (SelectedPageIndex > 0) && (SelectedPage.CanGoPrevious()));
 }