Esempio n. 1
0
        private void PBFunction_Paint(object sender, PaintEventArgs e)
        {
            //if linear function is selected
            if (RBLinear.Checked == true)
            {
                //grid lines are drawn
                myLinear.DrawGridLines(e.Graphics);
                //function is drawn
                myLinear.draw(e.Graphics);
            }

            //if quadratic function is selected
            if (RBQuadratic.Checked == true)
            {
                //grid lines are drawn
                myParabola.DrawGridLines(e.Graphics);
                //function is drawn
                myParabola.draw(e.Graphics);
            }

            //if absolute function is selected
            if (RBAbsolute.Checked == true)
            {
                //grid lines are drawn
                myAbsolute.DrawGridLines(e.Graphics);
                //function is drawn
                myAbsolute.draw(e.Graphics);
            }

            //if root function is selected
            if (RBRoot.Checked == true)
            {
                //grid lines are drawn
                myRoot.DrawGridLines(e.Graphics);
                //function is drawn
                myRoot.draw(e.Graphics);
            }

            // if cubic function is selected
            if (RBCubic.Checked == true)
            {
                //grid lines are drawn
                myCubic.DrawGridLines(e.Graphics);
                //function is drawn
                myCubic.draw(e.Graphics);
            }

            //if sine radio button is selected
            if (RBSine.Checked == true)
            {
                //grid lines are drawn
                mySine.DrawGridLines(e.Graphics);
                //function is drawn
                mySine.draw(e.Graphics);
            }

            //if cosine radio button is selected
            if (RBCosine.Checked == true)
            {
                //grid lines are drawn
                myCosine.DrawGridLines(e.Graphics);
                //function is drawn
                myCosine.draw(e.Graphics);
            }
        }