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.

Units<br />

Below is an example of accessing data through IUnitServiceSettings:<br />

// Get the unit service settings.<br />

IUnitServiceSettings uss;<br />

uss = CoreSystem.GetService();<br />

// Get the in memory unit system<br />

IUnitSystem ms = uss.InvariantSystem;<br />

// Get the user interface unit system<br />

IUnitSystem ui = uss.CurrentUISystem;<br />

// Get the catalog<br />

IUnitCatalog uc = uss.CurrentCatalog;<br />

// Add event handler for changes in the unit settings<br />

uss.SettingsChanged +=<br />

new EventHandler(unitsChanged);<br />

Unit Catalog<br />

The IUnitCatalog interface is the heart of the unit service. It provides information on<br />

the catalog including the name, description, available unit systems, units, and<br />

4-204 <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!