⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtfdocument.cs

📁 xhtml到rtf的转换程序!带源码!
💻 CS
字号:
using System;
using System.Drawing;

namespace RichTextBoxSupportsXHTML
{
	/// <summary>
	/// Summary description for RtfDocument.
	/// </summary>
	public class RtfDocument
	{
		private RtfFontTable fonttbl;
		private RtfColorTable colortbl;
		private string header;
		private string document;

		public RtfDocument()
		{
			//
			// TODO: Add constructor logic here
			//
			header = "{\\rtf1";
			fonttbl = new RtfFontTable();
			colortbl = new RtfColorTable();
		}

		public override string ToString()
		{
			header += fonttbl.ToString() + colortbl.ToString();
			return header + "{" + document + "}}";
		}

		public void AppendText(string text)
		{
			document += text;
		}

		public int UseFont(string fontName)
		{
			return fonttbl.UseFont(fontName);
		}

		public int UseColor(Color fromArgb)
		{
			return colortbl.UseColor(fromArgb);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -