private void RectangleMenuItem_Click(object sender, RoutedEventArgs e) { AddObjectDialog dialog = new AddObjectDialog("Add Rectangle"); GraphicalObject rectangle = new GraphicalObject(); rectangle.Type = ObjectType.RECTANGLE; dialog.Obj = rectangle; if (dialog.ShowDialog() == true) { objects.Add(dialog.Obj); RefreshGUI(); } }
private void LineMenuItem_Click(object sender, RoutedEventArgs e) { AddObjectDialog dialog = new AddObjectDialog("Add Line"); GraphicalObject line = new GraphicalObject(); line.Type = ObjectType.LINE; dialog.Obj = line; if (dialog.ShowDialog() == true) { objects.Add(dialog.Obj); RefreshGUI(); } }
private void EllipseMenuItem_Click(object sender, RoutedEventArgs e) { AddObjectDialog dialog = new AddObjectDialog("Add Ellipse"); GraphicalObject ellipse = new GraphicalObject(); ellipse.Type = ObjectType.ELLIPSE; dialog.Obj = ellipse; if (dialog.ShowDialog() == true) { objects.Add(dialog.Obj); RefreshGUI(); } }