Visual Components 在适用于 Windows 的 FRE 中实现。
ComponentSynchronizer 对象可让您在不同组件之间同步文档处理。这意味着,所有操作都会在所有已连接的 Visual Components 中同步执行。
组件同步器 没有用户界面。它不使用 Visual Components 的任何内部功能,只使用这些组件的 COM API。要了解 Synchronizer 在各种情况下的工作方式,请参见 组件同步器 的工作方式。
有关同步的信息通过专门的传出接口报告。这些接口包括 IComponentSynchronizerEvents (适用于 C++) 以及 dispinterface DIComponentSynchronizerEvents (适用于 Visual Basic) 。
需要注意的是,Visual Basic 用户无需关心事件接口实现的细节,因为该开发平台提供了简便的处理方式。此对象可在 Visual Basic 中声明为 WithEvents。
对于 C++ 用户来说,这意味着它支持 IConnectionPointContainer 接口。要接收通知事件,C++ 用户应创建一个派生自 IComponentSynchronizerEvents 接口的对象,然后通过标准 COM 方法,在该对象与 ComponentSynchronizer 对象中实现的事件源之间建立连接。
我们建议您在 Engine 反初始化之前释放 组件同步器。
| 名称 | 类型 | 描述 |
|---|
| Document | FRDocument | 指定与 组件同步器 关联的文档。 |
| DocumentViewer | DocumentViewer | 指定与 组件同步器 关联的 Document Viewer。 |
| ImageViewer | ImageViewer | 指定与 组件同步器 关联的 Image Viewer。 |
| PageIndex | int | 指定文档中当前活动页面的索引。 |
| ProcessingParams | DocumentProcessingParams | 存储文档的默认处理参数。如果通过此属性更改处理参数,则所附加的 Document Viewer、ImageViewer 和 Zoom Viewer 的 ProcessingParams 属性也会设置为相同的值;所附加的 Text Editor 和 Text Validator 的 SynthesisParamsForDocument 属性则会设置为 IDocumentProcessingParams::SynthesisParamsForDocument 的值。 |
| TextEditor | TextEditor | 指定与 组件同步器 关联的 Text Editor。 |
| TextValidator | TextValidator | 指定与 组件同步器 关联的 Text Validator。 |
| ZoomViewer | ZoomViewer | 指定与 组件同步器 关联的 Zoom Viewer。 |
以下代码示例中使用了此组件:VisualComponents。
IComponentSynchronizerEvents
组件同步器的工作原理
创建带图形用户界面的应用程序