private void AllocPensAndBrushes()
 {
     if (borderBrush == null)
     {
         borderBrush = new SolidBrush(Color.Black /*gradientBorderColor*/);
     }
     if (backGradientBrush == null)
     {
         backGradientBrush = new HatchBrush(HatchStyle.DiagonalCross, gradientHatchColor, gradientBackColor);
     }
     if (gradientBrush == null)
     {
         gradientBrush = new LinearGradientBrush2(gradientRect, Blend, LinearGradientMode.Horizontal);
     }
     if (markerBorderPen == null)
     {
         markerBorderPen = new Pen(markerBorderColor, markerBorderSize);
     }
     if (markerFillBrush == null)
     {
         markerFillBrush = new SolidBrush(markerFillColor);
     }
     if (selMarkerFillBrush == null)
     {
         selMarkerFillBrush = new SolidBrush(selMarkerFillColor);
     }
 }
 private void ClearGradientBrush()
 {
     if (gradientBrush != null)
     {
         gradientBrush.Dispose();
         gradientBrush = null;
     }
 }
Ejemplo n.º 3
0
 private void Redraw()
 {
     if (br != null)
     {
         br.Dispose();
         br = null;
     }
     Invalidate(true);
 }
Ejemplo n.º 4
0
 private void this_Paint(object sender, PaintEventArgs e)
 {
     if (blend != null)
     {
         if (br == null)
         {
             br = new LinearGradientBrush2(this.ClientRectangle, blend, mode);
         }
         br.FillRectangle(e.Graphics, this.ClientRectangle, SystemBrushes.Window);
     }
 }