Exemplo n.º 1
0
 private void InitDefaultValue()
 {
     btnSelect.BackColor        = Color.SkyBlue;
     cmbDashstyle.SelectedIndex = 0;
     trkWidth.Value             = 1;
     mode                 = Mode.Select;
     ckbFill.Checked      = false;
     cmbFillStyle.Enabled = false;
     undoRedoManager      = new UndoRedoManager();
     attributes           = new GraphicAttribute();
 }
Exemplo n.º 2
0
        public GraphicAttribute Clone()
        {
            GraphicAttribute res = new GraphicAttribute();

            res.strokeColor     = this.strokeColor;
            res.strokeWeight    = this.strokeWeight;
            res.backgroundColor = this.backgroundColor;
            res.fillStyle       = this.fillStyle;
            res.dashStyle       = this.dashStyle;
            res.angle           = this.angle;
            return(res);
        }
Exemplo n.º 3
0
        internal void SetGraphicsAttribute(GraphicAttribute attributes)
        {
            if (attributes[AttributeType.borderColor] != null)
            {
                borderColor = attributes[AttributeType.borderColor];
            }

            if (attributes[AttributeType.dashStyle] != null)
            {
                dashStyle = (DashStyle)attributes[AttributeType.dashStyle];
            }

            if (attributes[AttributeType.width] != null)
            {
                width = attributes[AttributeType.width];
            }

            if (attributes[AttributeType.backgroundColor] != null)
            {
                backgroundColor = attributes[AttributeType.backgroundColor];
            }

            if (attributes[AttributeType.isFill] != null)
            {
                isFill = attributes[AttributeType.isFill];
            }

            if (attributes[AttributeType.fillStyle] != null)
            {
                fillStyle = attributes[AttributeType.fillStyle];
            }

            if (attributes[AttributeType.width] != null)
            {
                width = attributes[AttributeType.width];
            }

            if (attributes[AttributeType.hatchStyle] != null)
            {
                hatchStyle = (HatchStyle)attributes[AttributeType.hatchStyle];
            }
        }
Exemplo n.º 4
0
 public GraphicAttribute(GraphicAttribute attribute)
 {
     attributes.Add(AttributeType.borderColor, (Color)attribute[AttributeType.borderColor]);
     attributes.Add(AttributeType.width, (Color)attribute[AttributeType.width]);
     attributes.Add(AttributeType.dashStyle, (int)attribute[AttributeType.dashStyle]);
 }