比较两个rtf文档,并将比较后的文档加载到RTF文本框中 [英] Compare two rtf documents and load the compared document into rich text box

查看:97
本文介绍了比较两个rtf文档,并将比较后的文档加载到RTF文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我需要两个rtf文档和两个RTF文本框,我只需要比较rtf文档,并将比较的文档加载到一个RTF文本框中,然后将该文档与另一个RTF文本框进行比较即可.请帮助.在此先感谢

Hi All i have two rtf documents and two rich text boxes all i need is i have to compare the rtf documents and load the compared document in one rich text box and the document before comparision to another rich text box. Pls help. Thanks in advance

推荐答案

将两个文档都加载到两个不同的Richtextboxes
现在比较文字
load both documents in two different richtextboxes
and now compare text
TextRange RTBText1 = New TextRange(RichTextBox1.Document.ContentStart, RichTextBox1.Document.ContentEnd)

TextRange RTBText2 = New TextRange(RichTextBox2.Document.ContentStart, RichTextBox2.Document.ContentEnd)

if RTBText1.Equals(RTBText2)
{ Messagebox.Show("Same");}
else
{ Messagebox.Show("Different");}


祝您编码愉快!
:)


Happy Coding!
:)


这篇关于比较两个rtf文档,并将比较后的文档加载到RTF文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆