Advertisement
Guest User

Untitled

a guest
Dec 12th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 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.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApp4
  12. {
  13. public partial class Form1 : Form
  14. {
  15. int caseSwitch = 1;
  16. public Form1()
  17. {
  18. InitializeComponent();
  19. }
  20.  
  21. private void Form1_Load(object sender, EventArgs e)
  22. {
  23. }
  24.  
  25. private void button1_Click(object sender, EventArgs e)
  26. {
  27. switch (caseSwitch)
  28. {
  29. case 1:
  30. case 2:
  31. case 3:
  32. button1.Text = caseSwitch + " расту ";
  33. button1.Width = Convert.ToInt32(button1.Width * 1.2);
  34. button1.Height = Convert.ToInt32(button1.Height * 1.2);
  35. caseSwitch++;
  36. break;
  37. case 4:
  38. case 5:
  39. case 6:
  40. button1.Text = caseSwitch + " уменьшаюсь";
  41. button1.Width = Convert.ToInt32(button1.Width / 1.2);
  42. button1.Height = Convert.ToInt32(button1.Height / 1.2);
  43. if (caseSwitch == 6)
  44. {
  45. caseSwitch = 0;
  46. }
  47. caseSwitch++;
  48. break;
  49. }
  50.  
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement