private void button1_Click(object sender, EventArgs e) { try { InputForm inputForm = new InputForm(); inputForm.Icon = Icon; inputForm.StartPosition = FormStartPosition.CenterParent; if (inputForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { AnalysisControl analysisView = new AnalysisControl(); List <Analysis> analyses = inputForm.Analysis; analysisView.Dock = DockStyle.Fill; // Add the analysis to the view analysisView.AddAnalysis(analyses); // Add to the UI list TabPage page = new TabPage(); page.BackColor = Color.White; page.Text = "Database-" + mtabs_analysis.TabCount.ToString(); page.Controls.Add(analysisView); mtabs_analysis.TabPages.Add(page); mtabs_analysis.Dock = DockStyle.Fill; mtabs_analysis.BringToFront(); mtabs_analysis.Visible = true; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public AnalysisPad() { _innerControl = new AnalysisControl(); }