public static Export ( OxyPlot.PlotModel model, string fileName, int width, int height, |
||
model | OxyPlot.PlotModel | |
fileName | string | |
width | int | |
height | int | |
background | ||
Résultat | void |
private void buttonSavePNG_Click(object sender, EventArgs e) { SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.Filter = "PNG Files (*.png)|*.png"; saveFileDialog1.FilterIndex = 1; if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { MousePlot.Export(this.plot1.Model, saveFileDialog1.FileName, 800, 600); } }
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); MousePlot.Export(this.plot1.Model, saveFileDialog1.FileName, width, height, backgnd); } }