Пример #1
0
    public void LoadSavedExpressionSets(List <ExpressionSet> expressionSets)
    {
        List <ExpressionSet> ess = new List <ExpressionSet>();

        for (int i = 0; i < expressionSets.Count; i++)
        {
            ess.Add(expressionSets[i].DeepCopy());
            ess[ess.Count - 1].CompileAll();
        }

        //var expression = new Dictionary<string, object>();
        var expressionString = "";

        foreach (var es in ess)
        {
            foreach (var e in es.expressions)
            {
                expressionString += e.Value.AKExpression.ToString() + "\n";
            }
        }
        //expression["expression"] = expressionString;
        StatisticsTracking.InstantEvent("Load Expression", expressionString);

        paramSurface.expressionSets = ess;
        pieceWiseControl.ForceNumberOfTabs(ess.Count);
        expressionSet = paramSurface.expressionSets[0];
        calcInput.ChangeOutput(expressionSet.expressions["X"]);
        if (boundsManager != null)
        {
            boundsManager.UpdateButtonText();
        }
        inputReceived = true;
    }
Пример #2
0
    public void LoadSavedExpressionSets(List <ExpressionSet> expressionSets)
    {
        List <ExpressionSet> ess = new List <ExpressionSet>();

        for (int i = 0; i < expressionSets.Count; i++)
        {
            ess.Add(expressionSets[i].DeepCopy());
            ess[ess.Count - 1].CompileAll();
        }
        paramSurface.expressionSets = ess;
        pieceWiseControl.ForceNumberOfTabs(ess.Count);
        expressionSet = paramSurface.expressionSets[0];
        calcInput.ChangeOutput(expressionSet.expressions[X]);
        if (boundsManager != null)
        {
            boundsManager.UpdateButtonText();
        }
        inputReceived = true;
    }