public void LoadXml(string Xml) { XDocument Doc = XDocument.Parse(Xml); var Root = Doc.Element("maze"); var Session = Root.Element("session"); if (Session != null) { _SessionLoop = new LoopControl(Session.AttributeValue <int>("count", 1)); SessionRest = new CountdownTimer(Session.AttributeValue <int>("rest"), "Session"); Root = Session; } var Trial = Root.Element("trial"); if (Trial != null) { _TrialLoop = new LoopControl(Trial.AttributeValue <int>("count", 1)); TrialDelay = new CountdownTimer(Trial.AttributeValue <int>("delay", 1), "Trial"); PromptBetweenTrials = Trial.AttributeValue <bool>("prompt"); Root = Trial; } LoadXml(Root); }
public CountdownTimerEventArgs(CountdownTimer ct) { Label = ct.Label; CurrentIteration = ct.CurrentCount; }