Beispiel #1
0
        public override void LoadFromXml(XmlElement xml)
        {
            base.LoadFromXml(xml);

            string opname = xml.GetAttribute("operator");
            var    lex    = xml.FindElement("LeftExpr");

            if (lex != null)
            {
                LeftExpr.LoadFromXml(lex);
            }
            if (!String.IsNullOrEmpty(opname))
            {
                for (int i = 0; i < Operator.Items.Count; i++)
                {
                    var op = Operator.Items[i] as ConditionOperatorDef;
                    if (op == null)
                    {
                        continue;
                    }
                    if (op.Factory.Identifier == opname)
                    {
                        Operator.SelectedIndex = i;
                    }
                }
                if (Operator.SelectedIndex < 0)
                {
                    throw new InternalError("DAE-00186 Unknown operator:" + opname);
                }
                ((ConditionOperatorDef)Operator.SelectedItem).LoadFromXml(xml);
            }
        }
Beispiel #2
0
 public override void LoadFromXml(XmlElement xml)
 {
     Expr1.LoadFromXml(xml.FindElement("Expr1"));
     Expr2.LoadFromXml(xml.FindElement("Expr2"));
 }
Beispiel #3
0
 public override void LoadFromXml(XmlElement xml)
 {
     Expr.LoadFromXml(xml.FindElement("RightExpr"));
 }