Exemplo n.º 1
0
        private void Button30_Click(object sender, EventArgs e)
        {
            try
            {
                ComboBox();
                if (string.IsNullOrEmpty(textBox24.Text))
                {
                    textBox24.Text = "1";
                }

                if (Selection26 == "MPH => KPH")
                {
                    textBox25.Text = Speeding.MPHtoKPH(textBox26.Text, Selection23, Selection24, Convert.ToInt32(textBox24.Text), Selection25, "Error!");
                }
                else
                {
                    textBox25.Text = Speeding.KPHtoMPH(textBox26.Text, Selection23, Selection24, Convert.ToInt32(textBox24.Text), Selection25, "Error!");
                }

                button29.Cursor = Cursors.Hand;
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
Exemplo n.º 2
0
        private void Button8_Click(object sender, EventArgs e)
        {
            if (Speeder)
            {
                textBox15.Text = Speeding.MPHtoKPH(textBox14.Text, false, false, 0, false, "Error!");
            }
            else
            {
                textBox14.Text = Speeding.KPHtoMPH(textBox15.Text, false, false, 0, false, "Error!");
            }

            Speeder = !Speeder;
        }