Пример #1
0
        internal void SendState(PrimitiveShape _primitiveShape)
        {
            primitiveShape = _primitiveShape;

            if (drawebleObject != null)
            {

                drawebleObject.PrimitiveShape = _primitiveShape;
                if (_primitiveShape.TypeOfShape != drawebleObject.type)
                    drawebleObject.ReDrawObject(_primitiveShape.TypeOfShape);
                drawebleObject.Invalidate();

            }
        }
Пример #2
0
 public void SetSstate(PrimitiveShape _primitiveShape)
 { 
     _primitiveShape.ReturnStateEventHandler += PrimitiveShape_ReturnStateEventHandler;
     (tabControl.SelectedTab as MyCustomTab).SendState(_primitiveShape);
 }
Пример #3
0
        protected void SendState()
        {
            PrimitiveShape prshape = new PrimitiveShape()
            {
                Color = colorDialog1.Color,
                LineWidth = trackBar1.Value,
                TypeOfShape = cmbShapes.SelectedIndex,
                X = Int32.Parse(txtBoxXCoord.Text),
                Y = Int32.Parse(txtBoxYCoord.Text),
                Width = Int32.Parse(txtBoxWidth.Text),
                Height = Int32.Parse(txtBoxHeight.Text)
            };

            cmd.SetSstate(prshape);
        }
Пример #4
0
        internal void ReturnStateToForm(PrimitiveShape primitiveShape)
        {
            if (ReturnStateEventHandler == null) return;

            ReturnStateEventHandler(primitiveShape, new EventArgs());
        }