diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 7e7af6d..b010917 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -66,6 +66,7 @@ this.button2.TabIndex = 3; this.button2.Text = "pwodottu"; this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); // // Form1 // diff --git a/Form1.cs b/Form1.cs index aeff038..08de49f 100644 --- a/Form1.cs +++ b/Form1.cs @@ -19,7 +19,31 @@ namespace EliaBombarolo private void button1_Click(object sender, EventArgs e) { + if(int.TryParse(textBox1.Text, out int num1) && int.TryParse(textBox2.Text, out int num2)) + { + MessageBox.Show($"{textBox1.Text}+{textBox2.Text} FALE {textBox1.Text + textBox2.Text}"); + } + else + { + MessageBox.Show("Inswerire numearo intero valido"); + } + } + private void button2_Click(object sender, EventArgs e) + { + if (int.TryParse(textBox1.Text, out int num1) && int.TryParse(textBox2.Text, out int num2)) + { + string porcodio = string.Empty; + for (int i = 0; i < num2; i++) + { + porcodio = porcodio + num1.ToString(); + } + MessageBox.Show($"OPwRAZZIONE FDARE {porcodio}"); + } + else + { + MessageBox.Show("Inswerire numearo intero valido"); + } } } }