/// <summary>
/// 获取RTF字符串图片的方向处理
/// </summary>
/// <param name="rtfBox">要处理的控件</param>
/// <param name="isLeft">是否向左</param>
public static void PhotoDirection(this RtfRichTextBox rtfBox, bool isLeft)
{
string sChar = "\\picw";
string str = rtfBox.Rtf;
if (isLeft)
{
rtfBox.Clear();
//拿到最后一个截图信息
int sIndex = str.LastIndexOf(sChar) + sChar.Length;
//拿到该组图片后的字符串
var cStr = str.Substring(sIndex);
//拿到该组图片的最后一个字符串
int eIndex = cStr.IndexOf("}") + 1;
str = str.Insert(sIndex + eIndex, "\\ql");
rtfBox.AppendRtf(str);
}
}