Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApp4
- {
- public partial class Form1 : Form
- {
- int caseSwitch = 1;
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- switch (caseSwitch)
- {
- case 1:
- case 2:
- case 3:
- button1.Text = caseSwitch + " расту ";
- button1.Width = Convert.ToInt32(button1.Width * 1.2);
- button1.Height = Convert.ToInt32(button1.Height * 1.2);
- caseSwitch++;
- break;
- case 4:
- case 5:
- case 6:
- button1.Text = caseSwitch + " уменьшаюсь";
- button1.Width = Convert.ToInt32(button1.Width / 1.2);
- button1.Height = Convert.ToInt32(button1.Height / 1.2);
- if (caseSwitch == 6)
- {
- caseSwitch = 0;
- }
- caseSwitch++;
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement