/// ------------------------------------------------------------------------------------ /// <summary> /// Output the RTF header, font table, color table, etc. /// </summary> /// ------------------------------------------------------------------------------------ private void OutputRTFHeadingStuff() { m_rtfBldr.AppendLine(khdr); m_rtfBldr.AppendLine(RtfHelper.FontTable(m_fontNumbers, ref m_uiFontNumber)); // Add color support if (m_cache.IsForSearchResults) { Dictionary <int, int> colorReferences; m_rtfBldr.AppendLine(RtfHelper.ColorTable( Properties.Settings.Default.QuerySearchItemBackColor, out colorReferences)); } m_rtfBldr.AppendLine(@"\pard\plain "); m_rtfBldr.AppendFormat(ktxcell, 2160); m_rtfBldr.AppendLine(); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Builds the RTF header, the bulk of which, is the font table. /// </summary> /// ------------------------------------------------------------------------------------ private void UpdateFonts(bool updateRecord) { m_uiFontSize = (int)FontHelper.UIFont.SizeInPoints * 2; if (App.Project == null) { return; } m_fontSizes = new Dictionary <string, int>(); foreach (var field in App.Project.Fields.Where(f => f.Font != null)) { m_fontSizes[field.Name] = (int)(field.Font.SizeInPoints * 2); m_fonts[field.Name] = field.Font; } m_rtf = khdr + RtfHelper.FontTable(m_fontNumbers, ref m_uiFontNumber); if (updateRecord) { UpdateRecord(m_recEntry, true); } }