예제 #1
0
        public object Clone()
        {
            var newSegmentHistory = SegmentHistory.Clone();

            return(new Segment(Name)
            {
                BestSegmentTime = BestSegmentTime,
                SplitTime = SplitTime,
                Icon = Icon, //TODO: Should be a clone //(this.Icon != null) ? this.Icon.Clone() as Image : null,
                SegmentHistory = newSegmentHistory,
                Comparisons = (IComparisons)Comparisons.Clone()
            });
        }
예제 #2
0
        public Segment Clone()
        {
            var newSegmentHistory = SegmentHistory.Clone();

            return(new Segment(Name)
            {
                BestSegmentTime = BestSegmentTime,
                SplitTime = SplitTime,
                Icon = Icon,
                SegmentHistory = newSegmentHistory,
                Comparisons = (IComparisons)Comparisons.Clone()
            });
        }
예제 #3
0
        public ISegment CopySegment()
        {
            var newSegmentHistory = SegmentHistory.Clone();

            return(new Segment(Name)
            {
                BestSegmentTime = BestSegmentTime,
                SplitTime = SplitTime,
                Icon = Icon,
                DeathCount = DeathCount,
                BestDeathCount = BestDeathCount,
                PersonalBestDeathCount = PersonalBestDeathCount,
                SegmentHistory = newSegmentHistory,
                Comparisons = (IComparisons)Comparisons.Clone(),
                Parent = Parent
            });
        }
예제 #4
0
        public object Clone()
        {
            var newSegmentHistory = new List <IIndexedTime>();

            foreach (var element in SegmentHistory)
            {
                newSegmentHistory.Add(new IndexedTime(element.Time, element.Index));
            }

            return(new Segment(Name)
            {
                BestSegmentTime = BestSegmentTime,
                SplitTime = SplitTime,
                Icon = Icon, //TODO: Should be a clone //(this.Icon != null) ? this.Icon.Clone() as Image : null,
                SegmentHistory = newSegmentHistory,
                Comparisons = (IComparisons)Comparisons.Clone()
            });
        }