Esempio n. 1
0
        private void buttonAddOwnEquationPoint_Click(object sender, EventArgs e)
        {
            if (CurrentCreatingEquation == null)
            {
                float FromX = 0f;
                float ToX   = 0f;
                CurrentCreatingEquation = new Equation_ByPoints(FromX, ToX);
                buttonFinishOwnEquationBuild.Visible = true;
            }
            float NewPointX = float.Parse(textBoxBuildOwnEquationX.Text.Replace('.', ','));
            float NewPointY = float.Parse(textBoxBuildOwnEquationY.Text.Replace('.', ','));

            CurrentCreatingEquation.AddNewPoint(new PointF(NewPointX, NewPointY));
            pictureBoxMainField.Refresh();
        }
Esempio n. 2
0
 private void buttonFinishOwnEquationBuild_Click(object sender, EventArgs e)
 {
     if (CurrentCreatingEquation.Points.Count >= 2)
     {
         equations.Add(CurrentCreatingEquation);
         CurrentCreatingEquation = null;
         MessageBox.Show("Созданная функция сохранена");
     }
     else
     {
         MessageBox.Show("В созданной вами функции недостаточно точек");
     }
     buttonFinishOwnEquationBuild.Visible = false;
     DisplayEquations();
     pictureBoxMainField.Refresh();
 }