示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
        /// <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);
        }