private void button2_Click(object sender, EventArgs e) { CKreis kreis = new CKreis(); try { kreis.Flaeche = Convert.ToInt32(textBox1.Text); richTextBox1.Text = kreis.Flaeche.ToString(); } catch { MessageBox.Show("insert value, please"); } }
private void button1_Click(object sender, EventArgs e) { CKreis kreis = new CKreis(); try { kreis.Radius = System.Convert.ToInt32(textBox1.Text); richTextBox1.Text = kreis.Radius.ToString(); } catch { MessageBox.Show("Error, insert value"); } }
private void button3_Click(object sender, EventArgs e) { CKreis kreis = new CKreis(); if (textBox1.Text != "") { kreis.Umfang = Convert.ToDouble(textBox1.Text); richTextBox1.Text = kreis.Umfang.ToString(); } else { MessageBox.Show("Exception, insert value"); } }