public static Shape CreateShape(ShapeType st) { ShapeEditor se = new ShapeEditor(st); try { if (se.ShowDialog() == DialogResult.OK) { return(se.Shape); } } catch (Exception e) { MessageBox.Show(e.Message); } return(null); }
public static Shape EditShape(Shape s) { int order = s.Order; ShapeEditor se = new ShapeEditor(s.Type); se.Shape = s; try { if (se.ShowDialog() == DialogResult.OK) { se.Shape.Order = order; return(se.Shape); } } catch (Exception e) { MessageBox.Show(e.Message); } return(null); }