private void SlabVisualizationForm_Load(object sender, EventArgs e) { sensorsPlots = new SensorsPlotsPanel(plotsView); slabModelPanel = new SlabModelPanel(slabId, standartSizeId, modelView); sectionsPanel = new SectionsPlotsPanel(sectionsView); deviationsPanel = new DeviationsPlotsPanel(deviationView); deviationView.MouseWheel += deviationView_MouseWheel; for (var i = 0; i < this.Controls.Count; ++i) { Controls[i].Hide(); } progressShower = new ProgressShower(); progressShower.Parent = this; progressShower.Dock = DockStyle.Fill; progressShower.Show(); loader.RunWorkerAsync(sensors); }
private void LoadCompleted(object sender, RunWorkerCompletedEventArgs e) { try { if (!isErrorLoading) { // графики показания датчиков. sensorsPlots.DrawPlots(points, sensors); sensorsPlots.ShowAllPlots(isAllPlotShowCheckedBox.Checked); // срезы слитка. sectionsPanel.SetSlabModel(slabModel); sectionsPanel.Initialize(); sectionsPanel.ShowLeftSection(); // графики отклонения от среднего. deviationsPanel.SetSlabModel(slabModel); deviationsPanel.Initialize(); deviationsPanel.ShowCurrentPlot(); // 3д модель слитка. InitializeSlabModelPanel(); slabModelPanel.ShowModel(); } } catch (Exception ex) { MessageBox.Show(@"Ошибка при построении модели: " + ex.Message); tabControl1.TabPages["slabModelPage"].Visible = false; tabControl1.TabPages["sectionsPage"].Visible = false; } finally { if (progressShower != null) { progressShower.Dispose(); progressShower = null; } for (var i = 0; i < this.Controls.Count; ++i) { Controls[i].Show(); } } }