예제 #1
0
        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");
            }
        }
예제 #2
0
        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");
            }
        }
예제 #3
0
        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");
            }
        }