本文整理汇总了C#中System.Xml.XmlNodeChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# XmlNodeChangedEventArgs类的具体用法?C# XmlNodeChangedEventArgs怎么用?C# XmlNodeChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlNodeChangedEventArgs类属于System.Xml命名空间,在下文中一共展示了XmlNodeChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AfterEvent
internal virtual void AfterEvent(XmlNodeChangedEventArgs args)
{
if (args != null)
{
this.OwnerDocument.AfterEvent(args);
}
}
示例2: AttributeChange
private void AttributeChange(Object src, XmlNodeChangedEventArgs args)
{
XmlAttribute attribute = src as XmlAttribute;
if(attribute.LocalName == "externalResourcesRequired")
{
externalResourcesRequired = null;
}
}
示例3: OnListChanged
private void OnListChanged( object sender, XmlNodeChangedEventArgs args ) {
if( atomized == false ) {
this.localName = this.rootNode.Document.NameTable.Add( this.localName );
this.namespaceURI = this.rootNode.Document.NameTable.Add( this.namespaceURI );
this.atomized = true;
}
if ( IsMatch( args.Node ) ) {
this.changeCount++ ;
this.curInd = -1;
this.curElem = rootNode;
if( args.Action == XmlNodeChangedAction.Insert )
this.empty = false;
}
}
示例4: ConcurrencyCheck
internal void ConcurrencyCheck(XmlNodeChangedEventArgs args){
if( atomized == false ) {
XmlNameTable nameTable = this.rootNode.Document.NameTable;
this.localName = nameTable.Add( this.localName );
this.namespaceURI = nameTable.Add( this.namespaceURI );
this.atomized = true;
}
if ( IsMatch( args.Node ) ) {
this.changeCount++ ;
this.curInd = -1;
this.curElem = rootNode;
if( args.Action == XmlNodeChangedAction.Insert )
this.empty = false;
}
this.matchCount = -1;
}
示例5: AttributeChange
private void AttributeChange(Object src, XmlNodeChangedEventArgs args)
{
XmlAttribute attribute = src as XmlAttribute;
if(attribute.NamespaceURI.Length == 0)
{
switch(attribute.LocalName)
{
case "viewBox":
viewBox = null;
break;
case "preserveAspectRatio":
preserveAspectRatio = null;
break;
}
}
}
示例6: ConcurrencyCheck
internal void ConcurrencyCheck(XmlNodeChangedEventArgs args)
{
if (_atomized == false)
{
XmlNameTable nameTable = _rootNode.Document.NameTable;
_localName = nameTable.Add(_localName);
_namespaceURI = nameTable.Add(_namespaceURI);
_atomized = true;
}
if (IsMatch(args.Node))
{
_changeCount++;
_curInd = -1;
_curElem = _rootNode;
if (args.Action == XmlNodeChangedAction.Insert)
_empty = false;
}
_matchCount = -1;
}
示例7: HandleNodeChanged
private void HandleNodeChanged(object sender, XmlNodeChangedEventArgs ea)
{
if (ea.Action == XmlNodeChangedAction.Change && ea.NewValue == ea.OldValue)
{
// A void change can be ignored.
//
return;
}
if (_changedNodes == null)
_changedNodes = new Stack();
_changedNodes.Push(new XmlNodeTrackBack(ea));
// Propagate changes to parent object, if set.
//
if (_parent != null)
_parent.OnPropertyChanged(_propertyInfo);
}
示例8: OnListChanged
private void OnListChanged(object sender, XmlNodeChangedEventArgs args)
{
lock (this)
{
if (this.elemList != null)
{
XmlElementList target = (XmlElementList) this.elemList.Target;
if (target != null)
{
target.ConcurrencyCheck(args);
}
else
{
this.doc.NodeInserted -= this.nodeChangeHandler;
this.doc.NodeRemoved -= this.nodeChangeHandler;
this.elemList = null;
}
}
}
}
示例9: AttributeChange
/// <summary>
/// Called when any attribute is changing. This is typically triggered by calls to
/// setAttribute() and should only be called from the CssXmlDocument.
/// </summary>
/// <see cref="CssXmlDocument"/>
public virtual void AttributeChange(Object src, XmlNodeChangedEventArgs args)
{
// Invalidate the CSS, the cascade for the CSS heirarchy will need to be recomputed
// We do this before and after the change because we need to invalidate the old and new locations
CssInvalidate();
XmlAttribute attribute = src as XmlAttribute;
if(attribute != null)
{
HandleAttributeChange(attribute);
}
// Notify any listeners
FireAttributeChange(src, args);
FireParentNodeChange(src, args, false);
FireChildNodeChange(src, args, false);
// Invalidate the CSS, the cascade for the CSS heirarchy will need to be recomputed
CssInvalidate();
}
示例10: NodeRemovedUndo
internal NodeRemovedUndo(XmlNodeChangedEventArgs e, object previous)
{
removedNode = e.Node;
parentNode = e.OldParent;
nextSibling = previous as XmlNode;
}
示例11: PreviousState
static internal object PreviousState(XmlNodeChangedEventArgs e)
{
return null;
}
示例12: NodeInsertedUndo
public NodeInsertedUndo(XmlNodeChangedEventArgs e, object previous)
{
iNode = e.Node;
}
示例13: NodeChanged
private void NodeChanged(object sender, XmlNodeChangedEventArgs e)
{
if (this._Undoing)
{
// if we're undoing ignore the event since it is the result of an undo
_pState = null;
_Undoing = false;
return;
}
UndoItem undo = null;
switch (e.Action)
{
case XmlNodeChangedAction.Insert:
undo = new NodeInsertedUndo(e, _pState);
break;
case XmlNodeChangedAction.Remove:
undo = new NodeRemovedUndo(e, _pState);
break;
case XmlNodeChangedAction.Change:
undo = new NodeChangedUndo(e, _pState);
break;
default:
throw new Exception("Unknown Action");
}
_pState = null;
if (_currentUndoGroup != null)
{
_currentUndoGroup.AddUndoItem(undo);
}
else if (GroupsOnly)
{
_pState = null;
}
else
{
_actions.Push(undo);
}
}
示例14: EventNodeChanging
private void EventNodeChanging (Object sender, XmlNodeChangedEventArgs e)
{
changing = true;
}
示例15: NodeRemoved
protected void NodeRemoved(object sender, XmlNodeChangedEventArgs e)
{
XmlAttribute attr=GetAttributeFromEvent(e);
if ( attr != null )
{
if ( e.OldParent != null && XmlUtil.HasAncestor(e.OldParent, attr.OwnerDocument.DocumentElement) )
{
ValidateRemovedAttribute((XmlElement) e.OldParent, attr);
RemoveIdOrIdRef((XmlElement) e.OldParent, attr);
}
return;
}
switch ( e.Node.NodeType )
{
case XmlNodeType.Element:
case XmlNodeType.EntityReference:
// remove this node and any child nodes
RecursiveRemove(e.Node);
XmlElement p=e.OldParent as XmlElement;
if ( p == null )
// go up dealing with entity references
p=XmlUtil.GetParentNode(e.Node) as XmlElement;
if ( p != null )
Validate(p);
break;
default:
// any other cases?
break;
}
}