示例#1
0
 private void NavigateHistory(ExplorerNavigationHistoryItem item)
 {
     NavigateHistory(this.History.IndexOf(item));
 }
示例#2
0
        public void AddHistory(ExplorerNavigationHistoryItem item, bool navigate)
        {
            if (navigate)
            {
                // To add a new history item, insert at the HistoryIndex and delete everything before it.
                if (this.HistoryIndex < 0 || this.HistoryIndex >= this.History.Count)
                {
                    this.HistoryIndex = 0;
                }

                if (this.History.Count <=0 || item.Key != this.History[this.HistoryIndex].Key) // this.History.IndexOf(item.Key) != this.HistoryIndex)
                {
                    this.History.Insert(this.HistoryIndex, item);

                    for (int i = this.HistoryIndex; i > 0; i--)
                    {
                        this.History.RemoveAt(0);   // always remove top most item, as items are shift forward after deletion.
                    }

                    this.HistoryIndex = 0;
                }
            }
            else
            {
                this.History.Add(item);
            }

            this.Invalidate();
        }
示例#3
0
 public void HistoryGo(ExplorerNavigationHistoryItem item)
 {
     NavigateHistory(item);
 }
示例#4
0
 public void AddHistory(ExplorerNavigationHistoryItem item)
 {
     AddHistory(item, true); //false);
 }