void renderData(object sender, RunWorkerCompletedEventArgs e) { Text = TabText = "Distribution Statistics"; Controls.OfType <Control>().ForEach(o => o.Enabled = true); if (e.Result is Exception) { ClearData(); Program.HandleException(e.Result as Exception); } precursorMassErrorForm.Show(dockPanel, DockState.Document); scanTimeDistributionForm.Show(dockPanel, DockState.Document); chargeStatesForm.Show(dockPanel, DockState.Document); lastActiveGraphForm.Activate(); precursorMassErrorForm.ZedGraphControl.GraphPane.AxisChange(); scanTimeDistributionForm.ZedGraphControl.GraphPane.AxisChange(); chargeStatesForm.ZedGraphControl.GraphPane.AxisChange(); precursorMassErrorForm.ZedGraphControl.RestoreScale(precursorMassErrorForm.ZedGraphControl.GraphPane); scanTimeDistributionForm.ZedGraphControl.RestoreScale(precursorMassErrorForm.ZedGraphControl.GraphPane); chargeStatesForm.ZedGraphControl.RestoreScale(precursorMassErrorForm.ZedGraphControl.GraphPane); Refresh(); }
private void setAutomaticScales() { if (InvokeRequired) { Invoke(new MethodInvoker(() => setAutomaticScales())); return; } if (meanMzErrorGraphForm.IsHidden) { meanMzErrorGraphForm.Show(dockPanel, DockState.Document); percentTicGraphForm.Show(dockPanel, DockState.Document); percentPeakCountGraphForm.Show(dockPanel, DockState.Document); lastActiveGraphForm.Activate(); } foreach (var graphControl in graphControls) { graphControl.MasterPane.AxisChange(); } if (!lockZoomCheckBox.Checked) { for (int i = 0; i <= (int)IonSeries.Count; ++i) { percentTicGraphControl.MasterPane.PaneList[i].YAxis.Scale.Max = Math.Min(100, maxPercentTic + 3); percentTicGraphControl.MasterPane.PaneList[i].YAxis.Scale.Min = 0; percentPeakCountGraphControl.MasterPane.PaneList[i].YAxis.Scale.Max = Math.Min(100, maxPercentPeakCount + 3); percentPeakCountGraphControl.MasterPane.PaneList[i].YAxis.Scale.Min = 0; meanMzErrorGraphControl.MasterPane.PaneList[i].YAxis.Scale.Max = maxMeanMzError + maxMeanMzError * 0.05; meanMzErrorGraphControl.MasterPane.PaneList[i].YAxis.Scale.Min = -meanMzErrorGraphControl.MasterPane.PaneList[i].YAxis.Scale.Max; } } foreach (var graphControl in graphControls) { graphControl.Refresh(); } }