コード例 #1
0
 private void okButton_Click(object sender, EventArgs e)
 {
     if (solidRadioButton.Checked)
     {
         filler = new BrushPainter2(FromLabelNud(solidColorLabel, solidAlphaNud));
     }
     else if (hatchRadioButton.Checked)
     {
         filler = new BrushPainter2(hatchComboBox.SelectedHatchStyle,
                                    FromLabelNud(hatchColorLabel, hatchAlphaNud),
                                    FromLabelNud(backColorLabel, backAlphaNud));
     }
     else if (gradientRadioButton.Checked)
     {
         filler = new BrushPainter2(gradientEditor.Blend);
     }
     else
     {
         filler = BrushPainter2.Empty();
     }
     DialogResult = DialogResult.OK;
 }
コード例 #2
0
 /// <summary>
 ///		Initializes a new instance of <c>BrushPainter2EditorDialog</c> using an empty <c>BrushPainter2</c>
 ///		and positioned beneath the specified control.
 /// </summary>
 /// <param name="c">Control beneath which the dialog should be placed.</param>
 public BrushPainter2EditorDialog(Control c) : this(BrushPainter2.Empty(), c)
 {
 }
コード例 #3
0
 /// <summary>
 ///		Initializes a new instance of <c>BrushPainter2EditorDialog</c> using an empty <c>BrushPainter2</c>
 ///     at the default window position.
 /// </summary>
 public BrushPainter2EditorDialog() : this(BrushPainter2.Empty())
 {
 }