예제 #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();
            }
        }
예제 #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();
            }
        }
예제 #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();
            }
        }