Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
Howto calculate in code behind?
posted

Hello,

I try to use your xamFormulaEditor, but I don't know how to achieve what I want, because there is no sample that fits.

What I'm trying to do is:

Step 1: Edit a formula string via xamFormulaEditor, where the operands should be 1 to n double values from an array.

Step 2: Store this string to disk. (no problem)

Step 3: Later on the program should pick up the formula string and do the calulation.

The problems are

Step 1: How can I tell the editor that there are n operands? The number of available operands will vary.

Step 3: What do I have to do in order to calculate my formula with my actual operands? There is no dialog window available at this moment.

 

Please could someone give me a small sample as a starter?

Maybe something with these two functions:

void OpenEditor(ref string formulaString, int numberOfOperands)   // opens window to edit the formula

double Calc(string formulaString, double[] operands)   // calculates the formula with the given operands

Parents Reply Children
No Data