示例#1
0
 /// <summary>
 /// <see cref="Control.Click"/> event handler 
 /// for the <see cref="Button"/> <see cref="btnBrushStyle"/>
 /// Raises a <see cref="BrushStyleDlg"/>.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">A empty <see cref="EventArgs"/></param>
 private void btnBrushStyle_Click(object sender, EventArgs e)
 {
   BrushStyleDlg dlgStyle = new BrushStyleDlg();
   dlgStyle.Text = "Set fill style ...";
   dlgStyle.Brush = bsaFillstyle.Brush;
   if (dlgStyle.ShowDialog() == DialogResult.OK)
   {
     bsaFillstyle.Brush = dlgStyle.Brush;
     OnShapePropertiesChanged(new ShapePropertiesChangedEventArgs(GetDrawAction(),
       this.NewPen, this.NewBrush, this.NewFont, this.NewFontColor, this.NewName, this.textAlignment));
   }
 }
示例#2
0
文件: AOIModule.cs 项目: DeSciL/Ogama
    /// <summary>
    /// The <see cref="Control.Click"/> event handler for the
    ///   <see cref="Button"/> <see cref="btnBubbleBrush"/>.
    ///   Shows a <see cref="BrushStyleDlg"/> for the bubble shapes.
    /// </summary>
    /// <param name="sender">
    /// Source of the event.
    /// </param>
    /// <param name="e">
    /// An empty <see cref="EventArgs"/>
    /// </param>
    private void BtnBubbleBrushClick(object sender, EventArgs e)
    {
      Brush backupBrush = this.aoiPicture.BubbleBrush;

      var dlgBubbleBrush = new BrushStyleDlg();
      dlgBubbleBrush.Text = "Set bubble brush style...";
      dlgBubbleBrush.Brush = this.aoiPicture.BubbleBrush;
      dlgBubbleBrush.BrushStyleChanged += this.dlgBubbleStyle_BrushStyleChanged;
      if (dlgBubbleBrush.ShowDialog() == DialogResult.Cancel)
      {
        this.UpdateStatisticProperties(
          this.aoiPicture.BubblePen, 
          backupBrush, 
          this.aoiPicture.BubbleFont, 
          this.aoiPicture.BubbleFontColor, 
          this.aoiPicture.BubbleTextAlignment, 
          VGStyleGroup.AOI_STATISTICS_BUBBLE);
      }
    }