// Load controller configuration.
// Handle PropertyError events in order to display errors and warnings.
// Handle PropertyStatus events in order to display progress.
public void LoadController()
{
Mpx.Controller controller = new Mpx.Controller(0);
Mpx.ConfigLoader loader = new Mpx.ConfigLoader();
// Have the OnLoadPropertyError method handle PropertyError events
loader.PropertyErrorEvent += OnLoadPropertyError;
// Have the OnLoadPropertyStatus method handle PropertyStatus
// events.
loader.PropertyStatusEvent += OnLoadPropertyStatus;
loader.LoadFromFile(controller, "controllerConfig.xml");
}
|