Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10515 for branches


Ignore:
Timestamp:
02/25/14 22:31:57 (11 years ago)
Author:
bburlacu
Message:

#1265: Removed bitmap private member and converted to auto-property (Bitmap property was never used).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs

    r9491 r10515  
    2929namespace HeuristicLab.Visualization {
    3030  public partial class ChartControl : UserControl {
    31     private Bitmap bitmap;
    3231    public Bitmap Bitmap { get; private set; }
     32
    3333    private bool renderingRequired;
    3434    private Point buttonDownPoint;
     
    243243      } else {
    244244        if ((pictureBox.Width == 0) || (pictureBox.Height == 0)) {
    245           bitmap = null;
     245          Bitmap = null;
    246246        } else {
    247           bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
     247          Bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
    248248          if (Chart != null) {
    249             Graphics graphics = Graphics.FromImage(bitmap);
     249            Graphics graphics = Graphics.FromImage(Bitmap);
    250250            graphics.SetClip(new System.Drawing.Rectangle(0, 0, pictureBox.Width, pictureBox.Height));
    251251            Chart.Render(graphics, pictureBox.Width, pictureBox.Height);
     
    254254        }
    255255        if (pictureBox.Image != null) pictureBox.Image.Dispose();
    256         pictureBox.Image = bitmap;
     256        pictureBox.Image = Bitmap;
    257257        renderingRequired = false;
    258258      }
     
    270270
    271271    private void SaveImageAsBitmap(string filename) {
    272       if (bitmap == null) throw new Exception("Bitmap is null.");
    273       bitmap.Save(filename);
     272      if (Bitmap == null) throw new Exception("Bitmap is null.");
     273      Bitmap.Save(filename);
    274274    }
    275275
Note: See TracChangeset for help on using the changeset viewer.