protected void AppendHtmlSynchronized(Document doc, ISynchronizeInvoke sync, ScriptOutputMessage output, string html) { if (string.IsNullOrWhiteSpace(html)) { return; } ExecuteMethodSync(sync, () => AppendHtml(doc, output, html)); }
internal virtual void HandleScriptOutputMessage(ScriptOutputMessage message) { // Check if we have a subitem that must also handle this line if (currentSubItem != null) { currentSubItem.HandleScriptOutputMessage(message); } else { ReportItems.Add(new TrXmlEntry(message)); } }
protected virtual void AppendHtml(Document doc, ScriptOutputMessage output, string html) { doc.BeginUpdate(); try { var range = doc.AppendHtmlText(html, DevExpress.XtraRichEdit.API.Native.InsertOptions.KeepSourceFormatting); doc.CaretPosition = range.End; ScrollToCaret(); } catch (Exception ex) { ReportError(doc, ex); } finally { doc.EndUpdate(); } }
protected virtual void AppendImage(Document doc, ScriptOutputMessage output, string fileName) { doc.BeginUpdate(); try { fileName = Project.Current.MapPath(fileName); doc.Images.Append(DocumentImageSource.FromFile(fileName)); var paragraph = doc.Paragraphs.Append(); doc.CaretPosition = paragraph.Range.End; ScrollToCaret(); } catch (Exception ex) { ReportError(doc, ex); } finally { doc.EndUpdate(); } }
protected void FlushTextBufferSynchronized(Document doc, ISynchronizeInvoke sync, ScriptOutputMessage output, StringBuilder buffer) { if (buffer.Length <= 0) { return; } ExecuteMethodSync(sync, () => FlushTextBuffer(doc, output, buffer)); }
protected virtual void ProcessBuffer(Document doc, ISynchronizeInvoke sync, ScriptOutputMessage output, StringBuilder buffer) { FlushTextBufferSynchronized(doc, sync, output, buffer); }
protected void AppendImageSynchronized(Document doc, ISynchronizeInvoke sync, ScriptOutputMessage output, string fileName) { if (string.IsNullOrWhiteSpace(fileName)) { return; } ExecuteMethodSync(sync, () => AppendImage(doc, output, fileName)); }
protected virtual void FlushTextBuffer(Document doc, ScriptOutputMessage output, StringBuilder buffer) { FlushTextBuffer(doc, output.ForegroundColor, output.BackgroundColor, buffer); }
public TrXmlEntry(ScriptOutputMessage message) : this(message as ScriptMessageBase) { MainType = TafTestReportItemMainType.ScriptOutputLine; EndTime = message.TimeStamp; }
public bool IsFormattingEqual(ScriptOutputMessage args2) { return(args2 != null && args2.ForegroundColor == this.ForegroundColor && args2.BackgroundColor == this.BackgroundColor); }