/// <summary> /// Is called after last batch step ist called. /// </summary> protected void BatchEnds() { try { // combine created files FileStream resultFile = File.Open(ExportFile, FileMode.Create); foreach (string file in _createdFiles) { FileStream fileStream = File.Open(file, FileMode.Open); byte[] fileContent = new byte[fileStream.Length]; fileStream.Read(fileContent, 0, (int)fileStream.Length); resultFile.Write(fileContent, 0, (int)fileStream.Length); fileStream.Close(); } resultFile.Close(); foreach (string file in _createdFiles) { System.IO.File.Delete(file); } Fractrace.Gui.ExportResultDialog exportResultDialog = new Gui.ExportResultDialog(ExportFile); exportResultDialog.ShowDialog(); if (exportResultDialog.OpenInBrowser) { System.Diagnostics.Process.Start(ExportFile); } } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.ToString()); } // restore current ParameterDict. ParameterDict.Current.SetDouble("Transformation.Camera.AngleX", _startAngleX); ParameterDict.Current.SetDouble("Transformation.Camera.AngleY", _startAngleY); ParameterDict.Current.SetDouble("Transformation.Camera.AngleZ", _startAngleZ); }
/// <summary> /// Is called after last batch step ist called. /// </summary> protected void BatchEnds() { // TODO: let exporter write result file. _exporter.UpdateExport(ExportFile); // restore current ParameterDict. ParameterDict.Current.SetDouble("Transformation.Camera.AngleX", _startAngleX); ParameterDict.Current.SetDouble("Transformation.Camera.AngleY", _startAngleY); ParameterDict.Current.SetDouble("Transformation.Camera.AngleZ", _startAngleZ); Fractrace.Gui.ExportResultDialog exportResultDialog = new Gui.ExportResultDialog(ExportFile); exportResultDialog.ShowDialog(); if (exportResultDialog.OpenInBrowser) { System.Diagnostics.Process.Start(ExportFile); } }
/// <summary> /// Is called after last batch step ist called. /// </summary> protected void BatchEnds() { try { // combine created files FileStream resultFile = File.Open(ExportFile, FileMode.Create); foreach (string file in _createdFiles) { FileStream fileStream = File.Open(file, FileMode.Open); byte[] fileContent = new byte[fileStream.Length]; fileStream.Read(fileContent, 0, (int)fileStream.Length); resultFile.Write(fileContent, 0, (int)fileStream.Length); fileStream.Close(); } resultFile.Close(); foreach (string file in _createdFiles) { System.IO.File.Delete(file); } Fractrace.Gui.ExportResultDialog exportResultDialog = new Gui.ExportResultDialog(ExportFile); exportResultDialog.ShowDialog(); if (exportResultDialog.OpenInBrowser) System.Diagnostics.Process.Start(ExportFile); } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.ToString()); } // restore current ParameterDict. ParameterDict.Current.SetDouble("Transformation.Camera.AngleX", _startAngleX); ParameterDict.Current.SetDouble("Transformation.Camera.AngleY", _startAngleY); ParameterDict.Current.SetDouble("Transformation.Camera.AngleZ", _startAngleZ); }
/// <summary> /// Is called after last batch step ist called. /// </summary> protected void BatchEnds() { // TODO: let exporter write result file. _exporter.Export(ExportFile); // restore current ParameterDict. ParameterDict.Current.SetDouble("Transformation.Camera.AngleX", _startAngleX); ParameterDict.Current.SetDouble("Transformation.Camera.AngleY", _startAngleY); ParameterDict.Current.SetDouble("Transformation.Camera.AngleZ", _startAngleZ); Fractrace.Gui.ExportResultDialog exportResultDialog = new Gui.ExportResultDialog(ExportFile); exportResultDialog.ShowDialog(); if (exportResultDialog.OpenInBrowser) System.Diagnostics.Process.Start(ExportFile); }