Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication1
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. int a;
  19.  
  20. private void button1_Click(object sender, EventArgs e)
  21. {
  22. this.pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.es;
  23. }
  24.  
  25. private void button2_Click(object sender, EventArgs e)
  26. {
  27. this.pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.br;
  28. }
  29.  
  30. private void pictureBox1_Click(object sender, EventArgs e)
  31. {
  32. switch (a)
  33. {
  34. case 1:
  35. pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.ar;
  36. a = a + 1;
  37. break;
  38. case 2:
  39. pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.es;
  40. a = a +1;
  41. break;
  42. case 3:
  43. pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.br;
  44. a = a + 1;
  45. break;
  46. case 4:
  47. pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.rd;
  48. a = a + 1;
  49. break;
  50. case 5:
  51. pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.al;
  52. a = 1;
  53. break;
  54. }
  55. }
  56.  
  57. private void Form1_Load(object sender, EventArgs e)
  58. {
  59. pictureBox1.Image = WindowsFormsApplication1.Properties.Resources.selec;
  60. a = 1;
  61. }
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement