public void Undo_Executed(object sender, ExecutedRoutedEventArgs e) { if (undoLog.Count > 1) { redoLog.Add(undoLog.Pop()); BaseHull.Instance().Bulkheads = undoLog.Peek().Bulkheads; UpdateViews(); } }
private void Undo_Executed(object sender, ExecutedRoutedEventArgs e) { if (undoLog.Count > 1) { redoLog.Add(undoLog.Pop()); myHull = undoLog.Peek(); myHull.PropertyChanged += hull_PropertyChanged; myHull.SetBulkheadHandler(); UpdateViews(); } }
public void Redo_Executed(object sender, ExecutedRoutedEventArgs e) { if (redoLog.Count > 0) { BaseHull.Instance().Bulkheads = redoLog.Pop().Bulkheads; undoLog.Add(BaseHull.Instance()); undoLog.StartSnapshot(); UpdateViews(); } }
private void Redo_Executed(object sender, ExecutedRoutedEventArgs e) { if (redoLog.Count > 0) { myHull = redoLog.Pop(); myHull.PropertyChanged += hull_PropertyChanged; myHull.SetBulkheadHandler(); undoLog.Add(myHull); UpdateViews(); } }