0

我想在“开发策略”之类的模拟类别下显示一个指定的对话框,并在单击“确定”后执行某些操作。有没有办法显示原生 petrel 进程窗口?我可以在“ Slb.Ocean.Petrel.UI ”中看到一些类和接口,例如DialogBu​​ilderDialogPageIDialogPageFactoryIDialogPage ...但我不能使用它们,即使我不知道它们是否提供了我需要的对象。

4

2 回答 2

1

I think you want to create a Workstep (Slb.Ocean.Petrel.Workflow). The Ocean wizard lets offers a quick start. It creates optionally a process wrapper for you, which is the item showing up in the process tree.

Once you got familiar with the concepts, you can evolve the simplistic initial implementation by using the WorkflowEditorUIFactory. Check the namespace documentation in the Ocean documentation for more details.

IProcessDiagram offers different Add methods for your custom Process to enable custom positioning in the tree node sequence.

于 2014-06-25T08:39:09.097 回答
1

DialogBuilder.ShowSettings(object)您可以使用和传递Process实例以编程方式显示特定进程对话框。这通常由插件用于启动其自己的进程对话框,但可以Process使用FindProcess(string). 当然,这是一种非常脆弱的方法:

Process p = PetrelSystem.ProcessDiagram.FindProcess("Development strategy");
PetrelSystem.DialogBuilder.ShowSettings(p);

它需要大量的错误处理,不仅要防止更改进程名称,还要处理已打开独占进程对话框的情况。

但是,这仍然只会启动对话框。无法知道用户是否/何时单击“确定”按钮。Petrel 流程通常是独立的功能片段,并且通常通过创建工作流来支持任何类型的链接。

于 2014-06-25T14:48:38.863 回答