public void Do(IModify modify) { modify.Execute(); unDoModifies.Add(modify); if (unDoModifies.Count > 100) { unDoModifies.RemoveAt(0); } }
public IModify ReDo() { if (reDoModifies.Count > 0) { IModify modify = reDoModifies[reDoModifies.Count - 1]; reDoModifies.Remove(modify); modify.Execute(); unDoModifies.Add(modify); if (unDoModifies.Count > 100) { unDoModifies.RemoveAt(0); } return(modify); } return(null); }