Exemplo n.º 1
0
 public override void Execute()
 {
     foreach (ObjectInstance inst in _objects)
     {
         _objectSource.AddObject(inst);
     }
 }
Exemplo n.º 2
0
        private ObjectLayer ProcessObjectLayer(ObjectLayer layer, ObjectPool objectLayerPool)
        {
            ObjectLayer outLayer = new ObjectLayer(layer.Name, layer.LayerOriginX, layer.LayerOriginY, layer.LayerWidth, layer.LayerHeight)
            {
                IsVisible  = layer.IsVisible,
                Opacity    = layer.Opacity,
                RasterMode = layer.RasterMode,
            };

            foreach (Property prop in layer.PropertyManager.CustomProperties)
            {
                outLayer.PropertyManager.CustomProperties.Add(prop);
            }

            foreach (ObjectInstance obj in layer.Objects)
            {
                if (!objectLayerPool.Objects.Contains(obj.ObjectClass.Uid))
                {
                    objectLayerPool.Objects.Add(obj.ObjectClass);
                }

                outLayer.AddObject(obj);
            }

            return(outLayer);
        }
Exemplo n.º 3
0
        public override void Undo()
        {
            foreach (ObjectInstance inst in _objects)
            {
                _objectSource.AddObject(inst);
            }

            AddSelectedObjects(_objects);
        }