Exemplo n.º 1
0
        public void fractionCompile(int num, int den)
        {
            if (den != 0 && num != 0)
            {
                switch (option)
                {
                case "Null":
                {
                    //msg no activity
                    about info = new about("To function choosen.");
                    info.Show();
                    break;
                }

                case "buttonPlus":
                {
                    sum(num, den);
                    break;
                }

                case "buttonMinus":
                {
                    sum(-num, den);
                    break;
                }

                case "buttonCompose":
                {
                    compose(num, den);
                    break;
                }

                case "buttonDivide":
                {
                    compose(den, num);
                    break;
                }

                case "buttonPOW":
                {
                    compose(numerator, denominator);
                    break;
                }

                case "buttonReverce":
                {
                    if (denominator != 0)
                    {
                        reverce();
                    }
                    else
                    {
                        setNum(0, 1);
                    }
                    break;
                }
                }
                optimization();
            }
        }
Exemplo n.º 2
0
        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            about info = new about();

            info.Show();
        }