Exemple #1
0
        public static OngoingRun ParseXml(XmlNode node)
        {
            OngoingRun result = new OngoingRun();

            var size = node.ChildNodes.Count;

            for (int i = 0; i < size; i++)
            {
                var child  = node.ChildNodes[i];
                var deaths = int.Parse(child.Attributes["deathCount"].InnerText);
                var time   = Time.FromXml(child["Time"]);
                result.SplitDeaths.Add(deaths);
                result.SplitEndTimes.Add(time);
            }
            return(result);
        }
Exemple #2
0
        public OngoingRun CreateOngoingRun()
        {
            if (CurrentPhase != TimerPhase.Running && CurrentPhase != TimerPhase.Paused)
            {
                return(null);
            }
            OngoingRun result = new OngoingRun();

            for (var i = 0; i < CurrentSplitIndex; i++)
            {
                result.SplitDeaths.Add(Run[i].DeathCount);
                result.SplitEndTimes.Add(Run[i].SplitTime);
            }
            result.SplitDeaths.Add(CurrentSplit.DeathCount);
            result.SplitEndTimes.Add(CurrentTime);
            return(result);
        }