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.

The <strong>Ocean</strong> Module<br />

IModuleAppearance allows you to control the descriptive information, name, icon, and<br />

uniform resource identifier (URI) for the module. It is linked to the module through the<br />

ModuleAppearance attribute, so it is usually implemented by a separate class.<br />

Consider the module class defined earlier:<br />

namespace Slb.<strong>Ocean</strong>.Demo.MyModule<br />

{<br />

public class MyModule : IModule<br />

{<br />

...<br />

}<br />

}<br />

To define a module appearance for this class, we create a new class in the namespace that<br />

implements IModuleAppearance.<br />

internal class MyModuleAppearance : IModuleAppearance<br />

{<br />

public string Description<br />

{<br />

get { return “Simple illustration of a module.”; }<br />

}<br />

public string DisplayName<br />

{<br />

get { return “My Test Module”; }<br />

}<br />

public string ImageResourceName<br />

{<br />

get { return “Slb.<strong>Ocean</strong>.Demo.MyModule.bmp”; }<br />

}<br />

public Uri ModuleUri<br />

{<br />

get { return (new Uri( “http://www.ocean.slb.com/MyModule” )); }<br />

}<br />

}<br />

3-40 <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!