private static SelectorView ReadSelectorView(StageElement sve, AIUI parent) { var sv = new SelectorView { name = sve.ValueOrDefault <string>(ElementName.Name), description = sve.ValueOrDefault <string>(ElementName.Description), viewArea = sve.ValueOrDefault <Rect>(ElementName.ViewArea), parent = parent }; var defQv = sve.Element(ElementName.DefaultQualifier); sv.defaultQualifierView = defQv != null?ReadQualifierView(defQv, sv) : new QualifierView { parent = sv }; var qualifierViews = sve.Elements(ElementName.QualifierView); foreach (var qve in qualifierViews) { var qv = ReadQualifierView(qve, sv); sv.qualifierViews.Add(qv); } return(sv); }
private static QualifierView ReadQualifierView(StageElement qve, SelectorView parent) { var qv = new QualifierView { name = qve.ValueOrDefault <string>(ElementName.Name, null), description = qve.ValueOrDefault <string>(ElementName.Description, null), parent = parent }; var ave = qve.Element(ElementName.ActionView); if (ave != null) { qv.actionView = ReadActionView(ave, qv); } return(qv); }