public void StoreHistory() { HistoryPoint point = new HistoryPoint(this.folder, this.filter, this.category, this.filterText, this.CurrentData); if (this.history.Count > 0 && this.history.Last.Equal(point)) { if (this.history.Last.ObjectData != this.CurrentData) { this.history.Last.ChangeObject(this.CurrentData); } } else { this.history.Add(point); } this.UpdateHistoryButtons(); }
private void ButtonForwardClick(object sender, EventArgs e) { HistoryPoint hp = this.history.Forward(); this.BeginUpdate(); try { if (hp.Folder == null && string.IsNullOrEmpty(hp.Category)) { App.Folder.SelectFolder(hp.FilterFolder); } else { App.Folder.SelectFolder(hp.Folder, hp.FilterText, hp.Category); } this.SelectObjectData(hp.ObjectData); this.UpdateHistoryButtons(); } finally { this.EndUpdate(); } }
public bool Equal(HistoryPoint point) { return(point.Folder == this.Folder && point.Category == this.Category && point.FilterFolder == this.FilterFolder); }