public MonitorForm() { // Init panel before ApplyResources Panel = new PreciseMeasureGraphPanel(); InitializeComponent(); graph.GraphPane.AxisChangeEvent += p => RefreshLabels(p); }
public void initMeasure(int progressMaximum, bool isPrecise) { // TODO: different types of panel PreciseSpectrumDisplayed = isPrecise; var g = Graph.MeasureGraph.Instance; MeasureGraphPanel panel; setXScaleLimits(); if (isPrecise) { panel = new PreciseMeasureGraphPanel(); } else { panel = new ScanMeasureGraphPanel(Config.sPoint, Config.ePoint); } // clear zoom stack CreateGraph(); panel.MeasureCancelRequested += MeasuredCollectorsForm_MeasureCancelRequested; panel.ProgressMaximum = progressMaximum; Panel = panel; panel.Init(g); // TODO: and set it visible together with menu item set checked! specterSavingEnabled = false; g.NewGraphData += InvokeRefreshGraph; g.ResetPointListsWithEvent(); Show(); Activate(); }