void CreateExporter() { //Construct export objects RenderState exportRenderState = new RenderState(); RenderStateControl exportRenderControl = new RenderStateControl(exportRenderState); DiffusionBuffers exportBuffers = new DiffusionBuffers(); DiffusionPathControl exportPathControl = new DiffusionPathControl(exportBuffers); exporter = new DiffusionExport(renderer, exportRenderState, exportRenderControl, exportPathControl, exportBuffers, framesContainer); }
/// <summary> /// Show Opendialog to select where images in /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ExportItem_Click(object sender, RoutedEventArgs e) { System.Windows.Forms.SaveFileDialog saveDialog = new System.Windows.Forms.SaveFileDialog(); saveDialog.Filter = DiffusionExport.GetImageTypeFilter(); saveDialog.ValidateNames = true; saveDialog.DefaultExt = "jpg"; saveDialog.FilterIndex = 2; if (saveDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { exporter.Export(saveDialog.FileName, saveDialog.FilterIndex - 1); } }