Exemplo n.º 1
0
 private void btnAddFunction_Click(object sender, EventArgs e)
 {
     FunctionEditor fe = new FunctionEditor();
     if (fe.ShowDialog() == DialogResult.OK)
     {
         var newFunc = fe.function;
         if (!CheckNewFunc(newFunc))
         {
             MessageBox.Show("Function " + newFunc.name + " already in configuration file");
             return;
         }
         functions.Add(newFunc);
         MessageBox.Show("Function " + newFunc.name + " added");
     }
 }
Exemplo n.º 2
0
        private void btnAddFunction_Click(object sender, EventArgs e)
        {
            FunctionEditor fe = new FunctionEditor();

            if (fe.ShowDialog() == DialogResult.OK)
            {
                var newFunc = fe.function;
                if (!CheckNewFunc(newFunc))
                {
                    MessageBox.Show("Function " + newFunc.name + " already in configuration file");
                    return;
                }
                functions.Add(newFunc);
                MessageBox.Show("Function " + newFunc.name + " added");
            }
        }