示例#1
0
        public static void Back(int i)
        {
            while (i > 0)
            {
                forwardHistory.Push(currentHistoryItem);
                currentHistoryItem = backwardHistory.Pop();
                i--;
            }

            DoHistoryItem(currentHistoryItem);
        }
示例#2
0
        public static void NewHistoryItem(HistoryItem historyItem)
        {
            if (InHistoryNavigation)
            {
                return;
            }

            if (historyItem.Equals(currentHistoryItem))
            {
                return;
            }

            if (currentHistoryItem != null)
            {
                backwardHistory.Push(currentHistoryItem);
            }

            forwardHistory.Clear();

            currentHistoryItem = historyItem;

            EnableHistoryButtons();
        }