示例#1
0
 protected void CopyBase(BaseMapObject copy, UniqueNumberGenerator numberGenerator)
 {
     copy.IsSelected = IsSelected;
     copy.Data       = Data.Copy(numberGenerator);
     foreach (var child in Hierarchy)
     {
         var c = (IMapObject)child.Copy(numberGenerator);
         c.Hierarchy.Parent = copy;
     }
     copy.DescendantsChanged();
 }
示例#2
0
 protected void CloneBase(BaseMapObject copy)
 {
     copy.IsSelected = IsSelected;
     copy.Data       = Data.Clone();
     foreach (var child in Hierarchy)
     {
         var c = (IMapObject)child.Clone();
         c.Hierarchy.Parent = copy;
     }
     copy.DescendantsChanged();
 }
示例#3
0
 protected void UncloneBase(BaseMapObject source)
 {
     IsSelected = source.IsSelected;
     Data       = source.Data.Clone();
     Hierarchy.Clear();
     foreach (var obj in source.Hierarchy)
     {
         var copy = (IMapObject)obj.Clone();
         copy.Hierarchy.Parent = this;
     }
     DescendantsChanged();
 }