Example #1
0
        private void bDzielenie_Click(object sender, EventArgs e)
        {
            if (tbI1.Text != "" && tbI2.Text != "" && tbR1.Text != "" && tbR2.Text != "")
            {
                Zespolone z1 = new Zespolone(double.Parse(tbR1.Text), double.Parse(tbI1.Text));
                Zespolone z2 = new Zespolone(double.Parse(tbR2.Text), double.Parse(tbI2.Text));

                Zespolone result = z1 / z2;

                tbResult.Text = result.ToString();
            }
        }
Example #2
0
        private void bRownosc_Click(object sender, EventArgs e)
        {
            if (tbI1.Text != "" && tbI2.Text != "" && tbR1.Text != "" && tbR2.Text != "")
            {
                Zespolone z1 = new Zespolone(double.Parse(tbR1.Text), double.Parse(tbI1.Text));
                Zespolone z2 = new Zespolone(double.Parse(tbR2.Text), double.Parse(tbI2.Text));

                if (z1 == z2)
                {
                    MessageBox.Show("Są równe!");
                }
                else
                {
                    MessageBox.Show("Nie są równe!");
                }
            }
        }