Пример #1
0
        private void parseComparisonResults(String groupname, AbstractAnalyticalResults ar, AbstractFEMResults fr)
        {
            ProjectManager pm = ProjectManager.GetInstance();

            var aResults   = ar == null ? null : ar.BuildResultsForDisplay();
            var femResults = fr == null ? null : fr.BuildResultsForDisplay();

            // show all analytical results (gmc)
            if (aResults != null)
            {
                foreach (String aName in aResults.Keys)
                {
                    ResultItem item = new ResultItem();
                    item.aName  = aName;
                    item.aValue = aResults[aName];

                    //compare if has femresults
                    if (femResults != null)
                    {
                        bool hasfemvalue = false;
                        foreach (String fName in femResults.Keys)
                        {
                            if (item.aName == fName)
                            {
                                item.femName  = fName;
                                item.femValue = femResults[fName];
                                if (item.aValue is double && item.femValue is double)
                                {
                                    double v1 = (double)item.aValue;
                                    double v2 = (double)item.femValue;
                                    item.difference = String.Format("{0:F3}%", (v2 - v1) / v2 * 100);
                                }
                                hasfemvalue = true;
                                break;
                            }
                        }

                        if (hasfemvalue)
                        {
                            femResults.Remove(item.femName);
                        }
                    }
                    //add item to list results
                    item.group = groupname;
                    results.Add(item);
                }
            }

            // add remaining item of femresults to list
            if (femResults != null)
            {
                foreach (String fName in femResults.Keys)
                {
                    ResultItem item = new ResultItem();
                    item.femName = fName;

                    if (femResults[fName] is ListPointD)
                    {
                        var ps = femResults[fName] as ListPointD;
                        item.femValue = ps.ToZedGraphPointPairList();
                    }
                    else
                    {
                        item.femValue = femResults[fName];
                    }

                    item.group = groupname;
                    results.Add(item);
                }
            }
        }
Пример #2
0
 private void runToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ProjectManager.GetInstance().runTransientAnalysis(currentPath);
 }
Пример #3
0
 private void removeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ProjectManager.GetInstance().removeTransientAnalysis(currentPath);
     currentPath = "";
     refreshUI();
 }
Пример #4
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ProjectManager.GetInstance().addTransientAnalysis();

            refreshUI();
        }