/// <summary> /// /// </summary> /// <param name="path"></param> private void ExportAsEmf(string path) { var context = DataContext as EditorContext; if (context == null) { return; } try { var writer = new EmfWriter(); writer.Save( path, context.Editor.Project.CurrentContainer, context.Editor.Project); } catch (Exception ex) { if (context.Editor.Log != null) { context.Editor.Log.LogError("{0}{1}{2}", ex.Message, Environment.NewLine, ex.StackTrace); } } }
/// <inheritdoc/> async Task IEditorApplication.OnExportAsEmfAsync(string path) { try { var page = _editor?.Project?.CurrentContainer; if (page != null) { EmfWriter.Save(path, page, _editor.Project as IImageCache); } } catch (Exception ex) { _log?.LogError($"{ex.Message}{Environment.NewLine}{ex.StackTrace}"); } await Task.Delay(0); }