Example #1
0
        protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
        {
            var exportInformation = new ExportInformation(Designation, Description);

            if (_page == null)
            {
                try
                {
                    exportInformation.ExportMade = OneNoteExporter.ExportToNewPage(surface);
                }
                catch (Exception ex)
                {
                    exportInformation.ErrorMessage = ex.Message;
                    Log.Error().WriteLine(ex);
                }
            }
            else
            {
                try
                {
                    exportInformation.ExportMade = OneNoteExporter.ExportToPage(surface, _page);
                }
                catch (Exception ex)
                {
                    exportInformation.ErrorMessage = ex.Message;
                    Log.Error().WriteLine(ex);
                }
            }
            return(exportInformation);
        }
Example #2
0
        public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
        {
            base.SetDefaults(surface);
            ExportInformation exportInformation = new ExportInformation(Designation, Description);

            if (page == null)
            {
                try {
                    exportInformation.ExportMade = OneNoteExporter.ExportToNewPage(surface);
                } catch (Exception ex) {
                    exportInformation.ErrorMessage = ex.Message;
                    LOG.Error(ex);
                }
            }
            else
            {
                try {
                    exportInformation.ExportMade = OneNoteExporter.ExportToPage(surface, page);
                } catch (Exception ex) {
                    exportInformation.ErrorMessage = ex.Message;
                    LOG.Error(ex);
                }
            }
            return(exportInformation);
        }