private void ButtonResetDrawQFBtn_Click(object sender, EventArgs e)
 {
     g = PictureBoxQFDemonstration.CreateGraphics();
     g.Clear(Color.YellowGreen);
     g.Dispose();
     ButtonStartDQFBtn.Enabled    = true;
     ButtonResetDrawQFBtn.Enabled = false;
 }
        private void ButtonStartDQFBtn_Click(object sender, EventArgs e)
        {
            ButtonStartDQFBtn.Enabled  = false;
            ButtonDrawingQFBtn.Enabled = true;
            int overScale = 10;
            int _x        = 1;
            int _y        = 1;
            int i         = 0;
            int j         = 0;

            int _startPoint = 0;

            int _xsclale = _startPoint + 150;
            int _yscale  = _startPoint + 150;

            Pen   _pen = new Pen(Color.White);
            Point _p1v = new Point(150, 0);
            Point _p2v = new Point(150, 300);
            Point _p1h = new Point(0, 150);
            Point _p2h = new Point(300, 150);

            g = PictureBoxQFDemonstration.CreateGraphics();
            g.DrawLine(_pen, _p1v, _p2v);
            g.DrawLine(_pen, _p1h, _p2h);
            for (i += _xsclale + _x * overScale; i <= 300; i = i + 10)
            {
                Point _xsc  = new Point(i, _yscale);
                Point _xsc2 = new Point(i, _yscale - 5);
                g.DrawLine(_pen, _xsc, _xsc2);
            }
            for (i += _xsclale - _x * overScale; i >= 0; i = i - 10)
            {
                Point _xsc  = new Point(i, _yscale);
                Point _xsc2 = new Point(i, _yscale - 5);
                g.DrawLine(_pen, _xsc, _xsc2);
            }
            for (i += _yscale - _y * overScale; i >= 0; i = i - 10)
            {
                Point _ysc  = new Point(_xsclale, i);
                Point _ysc2 = new Point(_xsclale + 5, i);
                g.DrawLine(_pen, _ysc, _ysc2);
            }
            for (i += _yscale + _y * overScale; i <= 300; i = i + 10)
            {
                Point _ysc  = new Point(_xsclale, i);
                Point _ysc2 = new Point(_xsclale + 5, i);
                g.DrawLine(_pen, _ysc, _ysc2);
            }
            Font _x_mark = new Font("Arial", 14);

            g.DrawString("x", _x_mark, Brushes.Red, new Point(280, 120));
            Font _y_mark = new Font("Arial", 14);

            g.DrawString("y", _y_mark, Brushes.Red, new Point(160, 5));

            g.Dispose();
        }
        private void ButtonDrawingQFBtn_Click(object sender, EventArgs e)
        {
            int   _qx_naosi;
            float _qy_naosi;

            ButtonDrawingQFBtn.Enabled   = false;
            ButtonResetDrawQFBtn.Enabled = true;

            Pen _penCurve        = new Pen(Color.Red, 2);
            Pen _penNameFunction = new Pen(Color.Red, 3);

            g = PictureBoxQFDemonstration.CreateGraphics();
            AmountElements._quadratic_x_mes = -140.0F;
            while (AmountElements._quadratic_x_mes < 140.0F)
            {
                AmountElements._quadratic_y_mes = -((0.02F * (AmountElements._quadratic_x_mes * AmountElements._quadratic_x_mes)));
                _qx_naosi = (int)AmountElements._quadratic_x_mes + 150;
                _qy_naosi = AmountElements._quadratic_y_mes + 150.0F;

                PointF pq1 = new PointF((float)_qx_naosi, _qy_naosi);
                AmountElements._quadratic_x_mes = AmountElements._quadratic_x_mes + 5;
                AmountElements._quadratic_y_mes = -(0.02F * AmountElements._quadratic_x_mes * AmountElements._quadratic_x_mes);

                _qx_naosi = _qx_naosi + 5;
                _qy_naosi = AmountElements._quadratic_y_mes + 150.0F;

                PointF pq2 = new PointF((float)_qx_naosi, _qy_naosi);
                if (AmountElements._quadratic_x_mes == 140.0F)
                {
                    break;
                }
                g.DrawLine(_penCurve, pq1, pq2);
            }
            Font _y_str_left = new Font("Arial", 14);

            g.DrawString("Y=", _y_str_left, Brushes.Red, new Point(2, 170));
            Font _zmiennax_q_symbol = new Font("Arial", 14);

            g.DrawString("x", _zmiennax_q_symbol, Brushes.Red, new Point(30, 170));
            Font _wykladnik_potegowy = new Font("Arial", 12);

            g.DrawString("2", _wykladnik_potegowy, Brushes.Red, new Point(40, 160));
            g.Dispose();
        }
        private void ButtonDrawingQFBtn_Click(object sender, EventArgs e)
        {
            int   _qx_naosi;
            float _qy_naosi;


            ButtonDrawingQFBtn.Enabled   = false;
            ButtonResetDrawQFBtn.Enabled = true;

            Pen _penCurve        = new Pen(Color.Red, 2);
            Pen _penNameFunction = new Pen(Color.Red, 3);

            //Pen _penCurve = new Pen(Color.Red);
            g = PictureBoxQFDemonstration.CreateGraphics();
            AmountElements._quadratic_x_mes = -140.0F;
            while (AmountElements._quadratic_x_mes < 140.0F)
            {
                AmountElements._quadratic_y_mes = -((0.02F * (AmountElements._quadratic_x_mes * AmountElements._quadratic_x_mes)));
                _qx_naosi = (int)AmountElements._quadratic_x_mes + 150;
                _qy_naosi = AmountElements._quadratic_y_mes + 150.0F;

                PointF pq1 = new PointF((float)_qx_naosi, _qy_naosi);
                AmountElements._quadratic_x_mes = AmountElements._quadratic_x_mes + 5;
                AmountElements._quadratic_y_mes = -(0.02F * AmountElements._quadratic_x_mes * AmountElements._quadratic_x_mes);

                _qx_naosi = _qx_naosi + 5;
                _qy_naosi = AmountElements._quadratic_y_mes + 150.0F;

                PointF pq2 = new PointF((float)_qx_naosi, _qy_naosi);
                if (AmountElements._quadratic_x_mes == 140.0F)
                {
                    break;
                }
                g.DrawLine(_penCurve, pq1, pq2);
            }
            Font _y_str_left = new Font("Arial", 14);

            g.DrawString("Y=", _y_str_left, Brushes.Red, new Point(2, 170));
            Font _zmiennax_q_symbol = new Font("Arial", 14);

            g.DrawString("x", _zmiennax_q_symbol, Brushes.Red, new Point(30, 170));
            Font _wykladnik_potegowy = new Font("Arial", 12);

            g.DrawString("2", _wykladnik_potegowy, Brushes.Red, new Point(40, 160));

            /*Point _p1f = new Point(150, 150);
             * Point _p2f = new Point(160, 145);
             * Point _p3f = new Point(170, 140);
             * Point _p4f = new Point(180, 130);
             * Point _p5f = new Point(190, 120);
             * Point _p6f = new Point(200, 110);
             * Point _p7f = new Point(210, 90);
             * Point _p8f = new Point(220, 70);
             * Point _p9f = new Point(225, 60);
             *
             * Point _plf1 = new Point(140, 145);
             * Point _plf2 = new Point(130, 140);
             * Point _plf3 = new Point(120, 130);
             * Point _plf4 = new Point(110, 120);
             * Point _plf5 = new Point(100, 110);
             * Point _plf6 = new Point(90, 100);
             * Point _plf7 = new Point(80, 80);
             * Point _plf8 = new Point(70, 60);
             * g.DrawLine(_penCurve, _p1f, _p2f);
             * g.DrawLine(_penCurve, _p2f, _p3f);
             * g.DrawLine(_penCurve, _p3f, _p4f);
             * g.DrawLine(_penCurve, _p4f, _p5f);
             * g.DrawLine(_penCurve, _p5f, _p6f);
             * g.DrawLine(_penCurve, _p6f, _p7f);
             * g.DrawLine(_penCurve, _p7f, _p8f);
             * g.DrawLine(_penCurve, _p8f, _p9f);
             *
             * g.DrawLine(_penCurve, _p1f, _plf1);
             * g.DrawLine(_penCurve, _plf1, _plf2);
             * g.DrawLine(_penCurve, _plf2, _plf3);
             * g.DrawLine(_penCurve, _plf3, _plf4);
             * g.DrawLine(_penCurve, _plf4, _plf5);
             * g.DrawLine(_penCurve, _plf5, _plf6);
             * g.DrawLine(_penCurve, _plf6, _plf7);
             * g.DrawLine(_penCurve, _plf7, _plf8);*/
            g.Dispose();
        }