02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Custom Processes<br />

In order to invoke the workstep, the UI needs to be given the associated workstep. Add a<br />

workstep argument to the constructor.<br />

public class MyUpscalingUI : UserControl<br />

{<br />

private MyUpscalingWorkstep.Args args;<br />

private WorkflowContext context;<br />

private MyUpscalingWorkstep workstep;<br />

}<br />

public MyUpscalingUI(MyUpscalingWorkstep w,<br />

MyUpscalingWorkstep.Args argPackage,<br />

WorkflowContext c)<br />

{<br />

this.workstep = w;<br />

this.args = argPackage;<br />

this.context = c;<br />

...<br />

}<br />

...<br />

Make the associated change in the UI Factory.<br />

public class UIFactory : WorkflowEditorUIFactory<br />

{<br />

protected override Control CreateDialogUICore(<br />

Workstep w, object argPackage, WorkflowContext c)<br />

{<br />

return new MyUpscalingUI((MyUpscalingWorkstep)w,<br />

(MyUpscalingWorkstep.Args)argPackage, c);<br />

}<br />

}<br />

6-342 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!