Beispiel #1
0
 public Segment(
     string name, Time pbSplitTime = default(Time),
     Time bestSegmentTime          = default(Time), Image icon = null,
     Time splitTime = default(Time))
 {
     Comparisons           = new CompositeComparisons();
     Name                  = name;
     PersonalBestSplitTime = pbSplitTime;
     BestSegmentTime       = bestSegmentTime;
     SplitTime             = splitTime;
     Icon                  = icon;
     SegmentHistory        = new SegmentHistory();
 }
Beispiel #2
0
 public Segment(string name, Time pbSplitTime = default(Time),
                Time bestSegmentTime          = default(Time), Image icon = null,
                Time splitTime = default(Time), int deathCount            = -1, int bestDeathCount = -1, int pbDeathCount = -1)
 {
     Comparisons            = new CompositeComparisons();
     Name                   = name;
     PersonalBestSplitTime  = pbSplitTime;
     BestSegmentTime        = bestSegmentTime;
     SplitTime              = splitTime;
     DeathCount             = deathCount;
     BestDeathCount         = bestDeathCount;
     PersonalBestDeathCount = pbDeathCount;
     Icon                   = null;
     SegmentHistory         = new SegmentHistory();
     Parent                 = null;
 }
Beispiel #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
            });
        }
Beispiel #4
0
        public static void AddSegment(this IRun run, string name, Time pbSplitTime = default(Time), Time bestSegmentTime = default(Time), Image icon = null, Time splitTime = default(Time), SegmentHistory segmentHistory = null)
        {
            var segment = new Segment(name, pbSplitTime, bestSegmentTime, icon, splitTime);

            if (segmentHistory != null)
            {
                segment.SegmentHistory = segmentHistory;
            }
            run.Add(segment);
        }
Beispiel #5
0
 public SegmentHistory(SegmentHistory history) : base(history)
 {
 }