コード例 #1
0
ファイル: AssessmentToolStrip.cs プロジェクト: wshanshan/DDD
		/// <summary>
		/// Used to graph measured data.  Produces a Measured Graph
		/// </summary>
		private void graphMeasuresButton_Click(object sender, EventArgs e) {

			if (this.navigatorGrid == null || this.assessmentResults == null) {
				logger.Warn("Either NavigatorGrid or AssessmentResultsPanel is NULL");
			}

			int[] selectedRun = this.navigatorGrid.getSelectedRunIds();

			if (selectedRun.Length > 1) {

				MessageBox.Show("Select a single Run in the Navigator", "Graphing Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return;
			}

			try {

				MeasureToGraphSelector measureSelector = new MeasureToGraphSelector(this.measureConfig, this.navigatorGrid.ProcessId, selectedRun[0]);
				DialogResult res = measureSelector.ShowDialog(this);
				if (res == DialogResult.OK) {
					if (("ChartType.LINEAR").Equals(measureSelector.Measure.GraphType)) {

						GraphSetupForm form = new GraphSetupForm(this.navigatorGrid.ProcessId, selectedRun[0], measureSelector.Measure);
						form.StartPosition = FormStartPosition.CenterParent;
						res = form.ShowDialog(this);
						if (res == DialogResult.OK) {
							this.assessmentResults.addMeasureGraph(form.ChartData);
						}
					}
					else {
						this.assessmentResults.addMeasureGraph(measureSelector.ChartData);
					}
				}
			}
			catch (Exception ex) {
				logger.Debug(ex.Message);
			}
		}
コード例 #2
0
ファイル: AssessmentToolStrip.cs プロジェクト: wshanshan/DDD
		/// <summary>
		/// Used to graph raw data.  Produces either a Costom Graph or a Run-to-Run Graph
		/// </summary>
        private void graphButton_Click(object sender, EventArgs e) {

            if (this.navigatorGrid == null || this.assessmentResults == null) {
                logger.Warn("Either NavigatorGrid or AssessmentResultsPanel is NULL");
            }

            int[] selectedRun = this.navigatorGrid.getSelectedRunIds();
            try {
				GraphSetupForm form = new GraphSetupForm(this.navigatorGrid.ProcessId, selectedRun);
				form.StartPosition = FormStartPosition.CenterParent;
				DialogResult res = form.ShowDialog(this);
				if (res == DialogResult.OK) {
					if (selectedRun.Length == 1)
						this.assessmentResults.addCustomGraph(form.ChartData);
					else
						this.assessmentResults.addRunToRunGraph(form.ChartData, selectedRun);
				}
			}
			catch (Exception ex) {
				logger.Debug(ex.Message);
			}
        }