Example #1
0
        private void DistributedOptionsWindow_Load(object sender, EventArgs e)
        {
            Debug.Assert(researches.Count() != 0);
            Debug.Assert(options.Count() != 0);

            if (researches.Count() == 1)
            {
                Text = StatSessionManager.GetResearchName(researches[0]);
            }
            else
            {
                Text = "Group Graphics";
            }

            researchInfo.Researches = researches;
            foreach (Guid id in researches)
            {
                StatSessionManager.LoadResearchResult(id);
            }

            // TODO optimize
            StatisticResult st = new StatisticResult(researches);

            foreach (AnalyzeOption o in options)
            {
                st.CalculateDistributedOption(o);

                if (st.EnsembleResultsAvg[0].Result.ContainsKey(o))
                {
                    TabPage     optTab = new TabPage(o.ToString());
                    GraphicsTab t      = new GraphicsTab(o, (SortedDictionary <Double, Double>)st.EnsembleResultsAvg[0].Result[o]);
                    t.Dock = DockStyle.Fill;
                    optTab.Controls.Add(t);
                    graphicsTab.TabPages.Add(optTab);
                }
                if (graphicsTab.TabPages.Count == 0)
                {
                    MessageBox.Show("None of checked options is calculated for selected researches.", "Information");
                }
            }
        }