Ejemplo n.º 1
0
        private void numericUpDownRadius_ValueChanged(object sender, EventArgs e)
        {
            ModificationObserver.AddModifyAction(CurrentShape, new CircleShape(CurrentShape as CircleShape));
            (CurrentShape as CircleShape).Radius = Convert.ToUInt32(numericUpDownRadius.Value);

            if (ModificationObserver.UpdateTCPClientNotifier != null)
            {
                ModificationObserver.UpdateTCPClientNotifier();
            }
        }
Ejemplo n.º 2
0
        private void UpdateEdgeValuesAt(int index)
        {
            ModificationObserver.AddModifyAction(CurrentShape, new RectangleShape(CurrentShape as RectangleShape));
            (CurrentShape as RectangleShape).EdgePoints[index] = new Point(Convert.ToInt32(edgeValues[index, 0].Value), Convert.ToInt32(edgeValues[index, 1].Value));

            if (ModificationObserver.UpdateTCPClientNotifier != null)
            {
                ModificationObserver.UpdateTCPClientNotifier();
            }
        }
Ejemplo n.º 3
0
        private void numericUpDownCenter_ValueChanged(object sender, EventArgs e)
        {
            ModificationObserver.AddModifyAction(CurrentShape, new CircleShape(CurrentShape as CircleShape));
            (CurrentShape as CircleShape).Center = new Point(Convert.ToInt32(numericUpDownCenterX.Value), Convert.ToInt32(numericUpDownCenterY.Value));

            if (ModificationObserver.UpdateTCPClientNotifier != null)
            {
                ModificationObserver.UpdateTCPClientNotifier();
            }
        }