private void buttonSavePNG_Click(object sender, EventArgs e) { SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.Filter = "PNG Files (*.png)|*.png"; saveFileDialog1.FilterIndex = 1; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { int width = checkBoxSize.Checked ? 800 : (int)this.plot1.Model.Width; int height = checkBoxSize.Checked ? 600 : (int)this.plot1.Model.Height; Brush backgnd = checkBoxBgnd.Checked ? null : new SolidBrush(Color.White); ControllerPlot.Export(this.plot1.Model, saveFileDialog1.FileName, width, height, backgnd); } }
private void buttonPlot_Click(object sender, EventArgs e) { if (this.mlog1.Cpi == 0.0 || (this.mlog2.Cpi == 0.0 && dual_state == dualstate.ready)) { MessageBox.Show("CPI value is invalid, please run Measure"); return; } if (this.mlog1.Events.Count > 0 || this.mlog2.Events.Count > 0) { this.mlog1.Desc = textBoxDesc1.Text; this.mlog2.Desc = textBoxDesc2.Text; ControllerPlot mousePlot = new ControllerPlot(this.mlog1, dual_state == dualstate.ready ? this.mlog2 : null, settings); mousePlot.Show(); } }