コード例 #1
0
 public NodeChangedEventArgs(Node node, Node oldParent, Node newParent, string oldValue, string newValue, NodeChangedAction action)
 {
     this.Node = node;
     this.OldParent = oldParent;
     this.NewParent = newParent;
     this.Action = action;
     this.OldValue = oldValue;
     this.NewValue = newValue;
 }
コード例 #2
0
ファイル: Document.cs プロジェクト: Alister742/ParseKit
        internal NodeChangedEventArgs GetEventArgs(Node node, Node oldParent, Node newParent, string oldValue, string newValue, NodeChangedAction action)
        {
            reportValidity = false;

            switch (action)
            {
                case NodeChangedAction.Insert:
                    if (onNodeInsertingDelegate == null && onNodeInsertedDelegate == null)
                    {
                        return null;
                    }
                    break;
                case NodeChangedAction.Remove:
                    if (onNodeRemovingDelegate == null && onNodeRemovedDelegate == null)
                    {
                        return null;
                    }
                    break;
                case NodeChangedAction.Change:
                    if (onNodeChangingDelegate == null && onNodeChangedDelegate == null)
                    {
                        return null;
                    }
                    break;
            }
            return new NodeChangedEventArgs(node, oldParent, newParent, oldValue, newValue, action);
        }
コード例 #3
0
        internal NodeChangedEventArgs GetEventArgs(Node node, Node oldParent, Node newParent, string oldValue, string newValue, NodeChangedAction action)
        {
            reportValidity = false;

            switch (action)
            {
            case NodeChangedAction.Insert:
                if (onNodeInsertingDelegate == null && onNodeInsertedDelegate == null)
                {
                    return(null);
                }
                break;

            case NodeChangedAction.Remove:
                if (onNodeRemovingDelegate == null && onNodeRemovedDelegate == null)
                {
                    return(null);
                }
                break;

            case NodeChangedAction.Change:
                if (onNodeChangingDelegate == null && onNodeChangedDelegate == null)
                {
                    return(null);
                }
                break;
            }
            return(new NodeChangedEventArgs(node, oldParent, newParent, oldValue, newValue, action));
        }
コード例 #4
0
 public NodeChangedEventArgs(Node node, Node oldParent, Node newParent, string oldValue, string newValue, NodeChangedAction action)
 {
     this.Node      = node;
     this.OldParent = oldParent;
     this.NewParent = newParent;
     this.Action    = action;
     this.OldValue  = oldValue;
     this.NewValue  = newValue;
 }