public override void CreateJavaScript(StringCollection methodToCompile, Dictionary <string, StringCollection> formsumissions, string nextActionInput, string indent)
        {
            IMathExpression mathExp = MathExp;

            if (mathExp != null)
            {
                string ce = mathExp.ReturnJavaScriptCodeExpression(methodToCompile);
                if (!string.IsNullOrEmpty(ce))
                {
                    string ceCondition = null;
                    if (Condition != null)
                    {
                        ceCondition = Condition.CreateJavaScriptCode(methodToCompile);
                    }
                    if (string.IsNullOrEmpty(ceCondition))
                    {
                        methodToCompile.Add(indent);
                        methodToCompile.Add(ce);
                    }
                    else
                    {
                        methodToCompile.Add(indent);
                        methodToCompile.Add("if(");
                        methodToCompile.Add(ceCondition);
                        methodToCompile.Add(") {\r\n");
                        methodToCompile.Add(indent);
                        methodToCompile.Add("\t");
                        methodToCompile.Add(ce);
                        methodToCompile.Add("\r\n");
                        methodToCompile.Add(indent);
                        methodToCompile.Add("}\r\n");
                    }
                }
            }
        }
        public override void ExportJavaScriptCode(ActionBranch currentAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodToCompile, JsMethodCompiler data)
        {
            IMathExpression mathExp = MathExp;

            if (mathExp != null)
            {
                string ce = mathExp.ReturnJavaScriptCodeExpression(methodToCompile);
                if (!string.IsNullOrEmpty(ce))
                {
                    string target = null;
                    string output = null;
                    if (nextAction != null)
                    {
                        if (nextAction.UseInput)
                        {
                            methodToCompile.Add("var ");
                            methodToCompile.Add(currentAction.OutputCodeName);
                            methodToCompile.Add("=");
                            methodToCompile.Add(ce);
                            methodToCompile.Add(";\r\n");
                            output = currentAction.OutputCodeName;
                        }
                    }
                    IVariable v = mathExp.OutputVariable;
                    if (v != null)
                    {
                        string ceCondition = null;
                        if (Condition != null)
                        {
                            ceCondition = Condition.CreateJavaScriptCode(methodToCompile);
                        }
                        target = v.ExportJavaScriptCode(methodToCompile);
                        string jsLine;
                        if (output != null)
                        {
                            jsLine = string.Format(System.Globalization.CultureInfo.InvariantCulture,
                                                   "{0}={1};\r\n", target, currentAction.OutputCodeName);
                        }
                        else
                        {
                            jsLine = string.Format(System.Globalization.CultureInfo.InvariantCulture,
                                                   "{0}={1};\r\n", target, ce);
                        }
                        if (string.IsNullOrEmpty(ceCondition))
                        {
                            methodToCompile.Add(jsLine);
                        }
                        else
                        {
                            methodToCompile.Add("if(");
                            methodToCompile.Add(ceCondition);
                            methodToCompile.Add(")\r\n{\r\n");
                            methodToCompile.Add(jsLine);
                            methodToCompile.Add("\r\n}\r\n");
                        }
                    }
                }
            }
        }