頁面調用方法
private void AddHistory(string title, string wmlsource, string url) //將記錄加到列表中
{
History h = new History();
h.Title = title;
h.WmlSource = wmlsource;
h.Url = url;
HistoryAction.Add(h);
RefurbishGoBackButton(); //刷新按鈕狀態.由自已定義
}
private void Back() //後退
{
HistoryAction.Back();
History h = HistoryAction.CurrentHistory; //獲取後退後的History對象
LoadHistory(h); //處理該對象,由自已定義.
RefurbishGoBackButton();//刷新按鈕狀態.由自已定義
}
private void Go() //前進
{
HistoryAction.Go();
History h = HistoryAction.CurrentHistory;
LoadHistory(h); //處理該對象,由自已定義.
RefurbishGoBackButton();//刷新按鈕狀態.由自已定義
}
OK,搞定,實際上非常簡單,這裡可以看到LinkedList的方便之處了.對性能的處理請自已把握.
好了,如果有不合理的地方請大家指正.