/// <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); } } }
/// <summary> /// save the changes to 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) { XmlNode node = SerializeUtil.GetCustomEventNode(rootNode, this.MemberId); if (string.CompareOrdinal(name, "Name") == 0) { XmlNode nd = SerializeUtil.CreatePropertyNode(node, "Name"); nd.InnerText = this.Name; _display = null; } else if (string.CompareOrdinal(name, "IsStatic") == 0) { XmlNode nd = SerializeUtil.CreatePropertyNode(node, "IsStatic"); nd.InnerText = this.IsStatic.ToString(); } else if (string.CompareOrdinal(name, "Description") == 0) { XmlNode nd = SerializeUtil.CreatePropertyNode(node, "Description"); nd.InnerText = this.Description; } else if (string.CompareOrdinal(name, "EventHandlerType") == 0) { XmlNode nd = SerializeUtil.CreatePropertyNode(node, "EventHandlerType"); writer.WriteValue(nd, this.EventHandlerType, null); _display = null; } }
/// <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); } } }