コード例 #1
0
        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            var results = (List<ResultsContainer>)e.Result;

            foreach (var result in results)
            {
                var resultsPanel = new ResultsPanel();
                resultsPanel.SetResults(result, setups[0].SelectedLocalities);
                AddResultsPanel(result.PageName, result.Name, resultsPanel);
            }

            waitForm.Close();
        }
コード例 #2
0
        private void AddResultsPanel(string pageName, string pageText, ResultsPanel resultsPanel)
        {
            resultsPagesOpen++;
            var newPage = new TabPage("Results " + resultsPagesOpen + " - " + pageText);

            newPage.Location = new System.Drawing.Point(4, 22);
            newPage.Size = new System.Drawing.Size(1185, 569);
            newPage.TabIndex = 3;
            newPage.Name = "resultsTab" + resultsPagesOpen;
            newPage.UseVisualStyleBackColor = true;
            newPage.ImageIndex = 3;

            resultsPanel.Location = new System.Drawing.Point(3, 3);
            resultsPanel.Name = "resultsPanel_" + resultsPagesOpen;
            resultsPanel.ResultsDescription = "Results " + resultsPagesOpen + " - " + pageText;
            resultsPanel.Size = new System.Drawing.Size(1153, 525);
            resultsPanel.Anchor =  ((System.Windows.Forms.AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right)))));

            resultsPanel.TabIndex = 0;

            AddContextMenuToTab(newPage);

            newPage.Controls.Add(resultsPanel);

            this.tabControl1.TabPages.Add(newPage);
            this.tabControl1.SelectedTab = newPage;
        }