private void UpdateView() { if (backgroundWorker1.IsBusy) { MessageBox.Show("Warning: The system is still busy"); return; } toolStripProgressBar1.Visible = true; //Cursor = Cursors.WaitCursor; explorer1.SelectedSeries = tree1.GetSelectedSeries(); if (explorer1.SelectedSeries.Length == 0) { ClearDisplay(); toolStripProgressBar1.Visible = false; Console.WriteLine("no update needed"); return; } //for (int i = 0; i < explorer1.SelectedSeries.Length; i++) //{ // Console.WriteLine(i.ToString() + ": "+explorer1.SelectedSeries[i].Appearance.LegendText); //} //explorer1.SelectedScenarios = scenarioChooser1.Selected; explorer1.SubtractFromBaseline = scenarioChooser1.SubtractFromBaseline; explorer1.IncludeBaseline = scenarioChooser1.IncludeBaseline; explorer1.IncludeSelected = scenarioChooser1.IncludeSelected; explorer1.MergeSelected = scenarioChooser1.MergeSelected; backgroundWorker1.RunWorkerAsync(); }
private void UpdateView() { if (backgroundWorker1.IsBusy) { MessageBox.Show("Warning: The system is still busy"); return; } toolStripProgressBar1.Visible = true; //Cursor = Cursors.WaitCursor; if (tree1.IsMeasurementSelected && !tree1.IsCommandLine) { var measurements = tree1.GetSelectedMeasurements(); if (measurements.Length > 1) { SetView(ratingTableView); ratingTableView.Draw(measurements); } else // view edit single measurement { SetView(measurementView); measurementView.Measurement = tree1.SelectedObject as BasicMeasurement; measurementView.Draw(); } toolStripProgressBar1.Visible = false; } else { if (!(explorer1.View is GraphExplorerView) || explorer1.View == null) { // need to switch back to timeseries views SetView(graphView1); } explorer1.SelectedSeries = tree1.GetSelectedSeries(); if (explorer1.SelectedSeries.Length == 0) { ClearDisplay(); toolStripProgressBar1.Visible = false; Console.WriteLine("no update needed"); return; } explorer1.SubtractFromBaseline = scenarioChooser1.SubtractFromBaseline; explorer1.IncludeBaseline = scenarioChooser1.IncludeBaseline; explorer1.IncludeSelected = scenarioChooser1.IncludeSelected; explorer1.MergeSelected = scenarioChooser1.MergeSelected; backgroundWorker1.RunWorkerAsync(); } }
private void SetGraphView() { if (!(engine1.View is GraphExplorerView) || engine1.View == null) { // need to switch back to timeseries views SetView(graphView1); } engine1.SelectedSeries = tree1.GetSelectedSeries(); if (engine1.SelectedSeries.Length == 0) { ClearDisplay(); toolStripProgressBar1.Visible = false; Console.WriteLine("no update needed"); return; } engine1.SubtractFromBaseline = scenarioChooser1.SubtractFromBaseline; engine1.IncludeBaseline = scenarioChooser1.IncludeBaseline; engine1.IncludeSelected = scenarioChooser1.IncludeSelected; engine1.MergeSelected = scenarioChooser1.MergeSelected; backgroundWorker1.RunWorkerAsync(); }