Torna al Thread
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
this.DoubleBuffered = true;
if (this.StatoCarta != StatoCarta.MazzettoComune)
e.Graphics.DrawImage(Immagine, new RectangleF(new Point(0, 0), this.Size));
else
{
this.Size = new Size(54, 72); // 75% della dimensione originale
RectangleF destinationRect = new RectangleF(0, 0, 0.75f * Immagine.Width, 0.75f * Immagine.Height);
RectangleF sourceRect = new RectangleF(0, 0, Immagine.Width, Immagine.Height);
e.Graphics.DrawImage(Immagine, destinationRect, sourceRect, GraphicsUnit.Pixel);
}
}