Ejemplo n.º 1
0
        private void onClick(object sender, System.EventArgs e)
        {
            FormulaEditorForm f = new FormulaEditorForm(variables, sub, symbols);

            if (formulaString != null)
            {
                f.Formula = formulaString;
            }
            Form    form = null;
            Control c    = this;

            while (true)
            {
                if (c is Form)
                {
                    form = c as Form;
                    break;
                }
                c = c.Parent;
            }
            f.ShowDialog(form);
            if (!f.Accepted)
            {
                return;
            }
            Formula = f.Formula;
            Refresh();
        }
Ejemplo n.º 2
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            var formula = value == null ? string.Empty : (string)value;
            var dlg     = new FormulaEditorForm(formula);

            return(dlg.ShowDialog() == DialogResult.OK ? dlg.Formula : value);
        }
Ejemplo n.º 3
0
        public void ShowFormulaEditor()
        {
            FormulaEditorForm formulaEditorForm = new FormulaEditorForm(this, this.EvaporationAndDryingSystem);

            formulaEditorForm.ShowDialog();
        }