Exemple #1
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            string text = "";

            for (int i = 0; i < textBox1.Text.Length; i++)
            {
                if (textBox1.Text[i] != ' ')
                {
                    text += textBox1.Text[i];
                }
            }
            if (text == "")
            {
                buttonDelete_Click(sender, e);
            }
            try
            {
                func = new KeyValuePair <FunctionsLib.basic.FunctionWithParameters <double>, string>(builder.Create(text), textBox1.Text);
                form.ChangetFunc(lastKey, func);
                lastKey = func.Key;
            }
            catch
            {
                MessageBox.Show("Не верно введен график.\nКлючевые слова: sin cos tg ln arcsin arccos arctg sgn e pi");
            }
        }
Exemple #2
0
 public FormFunc(KeyValuePair <FunctionsLib.basic.FunctionWithParameters <double>, string> func, FunctionsLib.FunctionBuilder <double> build, FormMain form)
 {
     InitializeComponent();
     textBox1.Text = func.Value;
     this.func     = func;
     builder       = build;
     this.form     = form;
     lastKey       = func.Key;
 }