/// <summary>
        /// update the action XML
        /// </summary>
        /// <param name="name"></param>
        /// <param name="rootNode"></param>
        /// <param name="writer"></param>
        public override void OnPropertyChanged(string name, object property, XmlNode rootNode, XmlObjectWriter writer)
        {
            base.OnPropertyChanged(name, property, rootNode, writer);
            if (XmlData != null)
            {
                if (string.CompareOrdinal(name, "ActionName") == 0)
                {
                    XmlUtility.XmlUtil.SetNameAttribute(XmlData, this.ActionName);
                }

                else if (string.CompareOrdinal(name, "BreakBeforeExecute") == 0)
                {
                    XmlNode propNode = SerializeUtil.CreatePropertyNode(XmlData, name);
                    propNode.InnerText = this.BreakBeforeExecute.ToString();
                }
                else if (string.CompareOrdinal(name, "BreakAfterExecute") == 0)
                {
                    XmlNode propNode = SerializeUtil.CreatePropertyNode(XmlData, name);
                    propNode.InnerText = this.BreakAfterExecute.ToString();
                }
                else if (string.CompareOrdinal(name, "ActionMethod") == 0)
                {
                    writer.ClearErrors();
                    ((ClassPointer)(Owner)).SaveAction(this, writer);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// update the action XML
        /// </summary>
        /// <param name="name"></param>
        /// <param name="rootNode"></param>
        /// <param name="writer"></param>
        public void OnPropertyChanged(string name, object property, XmlNode rootNode, XmlObjectWriter writer)
        {
            if (string.CompareOrdinal(name, "parameter") == 0)
            {
                return;
            }
            XmlNode actNode = SerializeUtil.GetActionNode(rootNode, this.ActionId);

            if (actNode != null)
            {
                if (string.CompareOrdinal(name, "ActionName") == 0)
                {
                    XmlUtility.XmlUtil.SetNameAttribute(actNode, this.ActionName);
                }
                else if (string.CompareOrdinal(name, "Description") == 0)
                {
                    XmlNode propNode = SerializeUtil.CreatePropertyNode(actNode, name);
                    propNode.InnerText = this.Description;
                }
                else if (string.CompareOrdinal(name, "BreakBeforeExecute") == 0)
                {
                    XmlNode propNode = SerializeUtil.CreatePropertyNode(actNode, name);
                    propNode.InnerText = this.BreakBeforeExecute.ToString();
                }
                else if (string.CompareOrdinal(name, "BreakAfterExecute") == 0)
                {
                    XmlNode propNode = SerializeUtil.CreatePropertyNode(actNode, name);
                    propNode.InnerText = this.BreakAfterExecute.ToString();
                }
                else if (string.CompareOrdinal(name, "ActionMethod") == 0)
                {
                    writer.ClearErrors();
                    _class.SaveAction(this, writer);
                }
            }
        }