1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54:
| public partial class dvdLibraryLOGIN : Form { int securitystat = 0; int securitylock = 0;
public dvdLibraryLOGIN() { InitializeComponent(); }
private void dvdLibraryLOGIN_Load(object sender, EventArgs e) { Paint += new PaintEventHandler(securityIMAGES); }
public void securityIMAGES(object sender, PaintEventArgs e) { Point seclockPOINT = new Point(23,60); Point secstatPOINT = new Point(60, 100);
switch (securitylock) { case 0: Image seclock0 = new Bitmap(Properties.Resources.pic_locked); e.Graphics.DrawImage(seclock0, seclockPOINT); break;
case 1: Image seclock1 = new Bitmap(Properties.Resources.pic_unlocked); e.Graphics.DrawImage(seclock1, seclockPOINT); break; }
if (securitylock == 0) { switch (securitystat) { case 0: Image secstat0 = new Bitmap(Properties.Resources.pic_secstat1); e.Graphics.DrawImage(secstat0, secstatPOINT); break;
case 1: Image secstat1 = new Bitmap(Properties.Resources.pic_secstat2); e.Graphics.DrawImage(secstat1, secstatPOINT); break;
case 2: Image secstat2 = new Bitmap(Properties.Resources.pic_secstat3); e.Graphics.DrawImage(secstat2, secstatPOINT); break; }
}
}
private void button1_Click(object sender, EventArgs e) { securitylock = 1; }
} |