Пример #1
0
 public virtual void AddShape(Shape shape)
 {
     shapes.Add(shape);
     ICanvasAware canvasAware = shape as ICanvasAware;
     if (canvasAware != null)
         canvasAware.Canvas = this;
     IsDirty = true;
 }
        public void SetProxy(IAopProxy target)
        {
            Shape shape = target as Shape;

            if (shape == null)
                throw new ArgumentException("target is not an IShape");

            this.shape = shape;

            DesignableAttribute attrib = (DesignableAttribute)shape.GetType().GetCustomAttributes(typeof(DesignableAttribute), true)[0];
            this.FillColor = attrib.FillColor;
            this.BorderColor = attrib.BorderColor;
            this.BorderSize = attrib.BorderSize;
        }
 private void MouseUp(Shape shape, int x, int y, MouseButtons buttons, ref bool handled)
 {
 }
 private void MouseDown(Shape shape, int x, int y, MouseButtons buttons, ref bool handled)
 {
     Canvas.ClearSelection();
     selectable.IsSelected = true;
     handled = true;
 }