Torna al Thread
private void panelFoto_Paint(object sender, PaintEventArgs e)
{
const byte a = 12;
const byte a2 = 112;
const byte b = 132;
const byte b2 = 232;
const byte c = 252;
const Int16 c2 = 352;
const Int16 d = 372;
const Int16 d2 = 472;
Int32 vO; // verticalOffset
Int32 oO; // orizzontalOffset
if (m_Disegna)
{
Int32 contatore = FPrincipale.listaFotoPaziente.Count;
vO = 20;
oO = a;
for (int i = 1; contatore >= 1; i++ )
{
if (oO <= 372)
{
Graphics frmMiniatura = panelFoto.CreateGraphics();
Rectangle destRect = new Rectangle(oO, vO, 100, 90);
Image img = m_FPrincipale.listaFotoPaziente[contatore - 1].ImmagineCaricata;
frmMiniatura.DrawImage(img, destRect);
Label etichetta = new Label();
this.panelFoto.Controls.Add(etichetta);
etichetta.AutoSize = true;
etichetta.ForeColor = System.Drawing.Color.Black;
etichetta.Location = new System.Drawing.Point(oO, 96);
etichetta.Name = (m_FPrincipale.listaFotoPaziente[contatore - 1].Data).ToShortDateString();
etichetta.Size = new System.Drawing.Size(10, 13);
etichetta.TabIndex = i;
// etichetta.Text = (m_FPrincipale.Paziente.listaFoto[contatore - 1].Data).ToShortDateString();
contatore--;
oO += 120;
}
else
{
oO = a;
vO = 110;
if (oO <= 372)
{
Graphics frmMiniatura = panelFoto.CreateGraphics();
Rectangle destRect = new Rectangle(oO, vO, 100, 90);
Image img = m_FPrincipale.listaFotoPaziente[contatore - 1].ImmagineCaricata;
frmMiniatura.DrawImage(img, destRect);
contatore--;
oO += 120;
}
}
}
// MessageBox.Show("Era l'ultima immagine presente");
}
// panelFoto.Dispose();
}