コード例 #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");
            }
        }