Exemplo n.º 1
0
        private void GoToPreviousPage()
        {
            if (navigationHistory.Count > 1)  //Назад 
            {
                
                 navigationHistory.Pop();

                // pageNumber.Text = (--pageNum).ToString();
            }

            NavigationCache.Book.NavigationHistory = new List<TextPosition>(navigationHistory.Reverse());
            currentBookInHistory.NavigationHistory = NavigationCache.Book.NavigationHistory;
            //NavigationCache.Book.NavigationHistory.Reverse();

            nextPosition = UpdateVisual();
        }
Exemplo n.º 2
0
        private void GoToNextPage()
        {
            var pos = navigationHistory.Peek(); //navigationHistory.Peek();
            if (nextPosition != null /*!(nextPosition.EndPosition == pos.EndPosition && nextPosition.WordCount == pos.WordCount)*/)
            {
               
                navigationHistory.Push(nextPosition);

                NavigationCache.Book.NavigationHistory = new List<TextPosition>(navigationHistory.Reverse());
                currentBookInHistory.NavigationHistory = NavigationCache.Book.NavigationHistory;

                

                //NavigationCache.Book.NavigationHistory.Reverse();

          
                nextPosition = UpdateVisual();
               

            }
            // pageNumber.Text = nextPosition.EndPosition.ToString();
        }
Exemplo n.º 3
0
 private void mainTextBlock_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     nextPosition = UpdateVisual();
 }