Beispiel #1
0
 protected internal virtual void ReplaceTo(NamedObject target)
 {
     if (target == null)
     {
         return;
     }
     if (GetType() != target.GetType())
     {
         throw new ArgumentException();
     }
     if (target.Control == null && Control != null)
     {
         target.Control = Control;
     }
     Control = null;
     for (int i = Nodes.Count - 1; 0 <= i; i--)
     {
         TreeNode node = Nodes[i];
         if (node.Target == this)
         {
             node.Target = target;
             target.Nodes.Add(node);
         }
     }
     Nodes.Clear();
 }
Beispiel #2
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            if (Identifier != obj.Identifier)
            {
                return(false);
            }
            Comment c = (Comment)obj;

            return(Text == c.Text);
        }
Beispiel #3
0
 public virtual bool ContentEquals(NamedObject obj)
 {
     if (obj == null)
     {
         return(false);
     }
     if (GetType() != obj.GetType())
     {
         return(false);
     }
     if (Identifier != obj.Identifier)
     {
         return(false);
     }
     return(true);
 }