/// <summary> /// Push item /// </summary> /// <param name="item">History item</param> public void PushItem(SimcaGraphZoomHistoryItem item) { SimcaGraphZoomHistoryItem newItem = new SimcaGraphZoomHistoryItem(); newItem = item.Clone(); _graphZoomHistory.Add(newItem); }
/// <summary> /// Clone /// </summary> /// <returns>clone instance</returns> public SimcaGraphZoomHistoryItem Clone() { SimcaGraphZoomHistoryItem item = new SimcaGraphZoomHistoryItem(); item.MinX = this.MinX; item.MaxX = this.MaxX; item.MinY = this.MinY; item.MaxY = this.MaxY; return(item); }
/// <summary> /// Pop item /// </summary> /// <param name="item">History item</param> /// <returns>T=Success F=Failure</returns> public bool PopItem(out SimcaGraphZoomHistoryItem item) { if (_graphZoomHistory.Count() == 0) { item = null; return(false); } SimcaGraphZoomHistoryItem lastItem = _graphZoomHistory.Last(); item = lastItem.Clone(); _graphZoomHistory.Remove(lastItem); return(true); }