/// <summary> /// Initializes a new instance of <c>FillerEditorDialog</c> using an empty <c>Filler</c> /// and positioned beneath the specified control. /// </summary> /// <param name="c">Control beneath which the dialog should be placed.</param> public ShapeDialog(Control c) : this(ShapePopulate.Empty(), c) { }
private void okBtn_Click(object sender, EventArgs e) { if (rectangle_RadioBtn.Checked) { try { //shapePopulate = new ShapePopulate( // shapes.Rectangle, // Color.DeepSkyBlue, // Color.Yellow,true,false,true, // rectangleCurve_Retrieved, // rectangleCurve_UL_Retrieved, // rectangleCurve_UR_Retrieved, // rectangleCurve_DL_Retrieved, // rectangleCurve_DR_Retrieved); shapePopulate = new ShapePopulate( shapes.Rectangle, Color.DeepSkyBlue, Color.Yellow, true, false, true, 10, 10, 10, 10, 10); SetControl_Rectangle_Passed_Values(shapePopulate); } catch (Exception exception) { MessageBox.Show(exception.Message); this.Close(); } } else if (circle_RadioBtn.Checked) { try { shapePopulate = new ShapePopulate(shapes.Circle, Color.DeepSkyBlue, Color.Yellow, true, false); SetControl_Circle_Passed_Values(shapePopulate); } catch (Exception exception) { MessageBox.Show(exception.Message); this.Close(); } } else if (polygon_RadioBtn.Checked) { try { shapePopulate = new ShapePopulate(shapes.Polygon, 3, 90); SetControl_Polygon_Passed_Values(shapePopulate); } catch (Exception exception) { MessageBox.Show(exception.Message); this.Close(); } } else if (pie_RadioBtn.Checked) { try { shapePopulate = new ShapePopulate(shapes.Pie, 3, 90, true); SetControl_Pie_Passed_Values(shapePopulate); } catch (Exception exception) { MessageBox.Show(exception.Message); this.Close(); } } else if (none_RadioBtn.Checked) { shapePopulate = new ShapePopulate(shapes.None, true); } else { shapePopulate = ShapePopulate.Empty(); } DialogResult = DialogResult.OK; }
/// <summary> /// Initializes a new instance of <c>FillerEditorDialog</c> using an empty <c>Filler</c> /// at the default window position. /// </summary> public ShapeDialog() : this(ShapePopulate.Empty()) { }