English 中文(简体)
WPF 1. 彩虹 方框 改变活动——如何删除或插入案文?
原标题:WPF RichTextBox TextChanged event - how to find deleted or inserted text?
问题回答

这主要取决于您对案文的改动。 当顺序包括两字和删除时,理论上不可能知道每个插入的细节,因为后来插入的一些符号可能已被删除。 因此,你们必须选择你真正想要的结果:

  • For some purposes you must to know the exact sequence of changes even if some of the inserted symbols must be left as "?".
  • For other purposes you must know exactly how the new text differs from the old but not the exact sequence in which the changes were made.

我将设法取得每一项成果。 我过去曾使用这两种技术,因此我知道这些技术是有效的。

www.un.org/Depts/DGACM/index_spanish.htm 确切顺序:

如果你执行历史或历史记录或寻找具体行动,则更合适。

为了这些用途,你描述的进程可能最好,可能作以下改动: 不是“在未知符号与真实符号之间寻找地图”,而是在寻找每个“代号”案文方面向前看,然后向后找到每个“Insert”文本。

换言之:

  1. 最初的案文开始处理改动。 每一插入: 符号。 删除每一编号,删除具体编号,并将其记录为删除案文。

  2. 从最后案文开始处理反向秩序的变化。 每一次delete,插入? 符号。 每一次insert/em>,删除具体编号,并将其记录为案文。

如果完成这项工作,你所有的“Insert”和“Delete”改动条目都将有相关文本,而且插入和立即删除的任何案文都将是? 符号。

www.un.org/Depts/DGACM/index_spanish.htm 获取差额

更适于修订标识或版本比较。

就这些用途而言,简单地利用案文改动信息来计算一套可能会发现变化的分类,然后采用标准分类法寻找实际变化。 这在处理增量变化方面往往非常有效,但还是给你最好的更新。

当你在几乎与原样的替换段落中重复使用时,情况尤其如此: 使用案文变更信息将显示整个段是新的,但使用分散(即这一技术)只标明实际不同的符号。

计算变化幅度的代码很简单: 代表这一变化为4名愤怒者(老起步、老步、新开端、新台)。 逐个变化:

  1. If changestart is before newstart, reduce newstart to changestart and reduce oldstart an equal amount
  2. If changeend is after newend, increase newend to changeend and increase oldend an equal amount

一旦完成,从旧单证中提取[原开端、旧端]和从新文件到[新开端、新端]的范围,然后使用标准立方算法对其进行比较。





相关问题
WPF convert 2d mouse click into 3d space

I have several geometry meshes in my Viewport3D, these have bounds of (w:1800, h:500, d:25). When a user clicks in the middle of the mesh, I want the Point3D of (900, 500, 25)... How can I achieve ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

WPF: writing smoke tests using ViewModels

I am considering to write smoke tests for our WPF application. The question that I am faced is: should we use UI automation( or some other technology that creates a UI script), or is it good enough to ...

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

How do WPF Markup Extensions raise compile errors?

Certain markup extensions raise compile errors. For example StaticExtension (x:Static) raises a compile error if the referenced class cannot be found. Anyone know the mechanism for this? Is it baked ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签