.

ConfigSaver.PropertyStatusEvent

This event is raised immediately prior to saving a property.

The user can provide a handler to this event in order to report progress or to exclude certain configuration elements from being saved.

The ConfigSavePropertyStatusEventArgs class provides access to the event data. The event data includes the progress percentage, as well as other pertinant information. It also provides a means of not saving particular properties or entire objects.

Version History

Introduced in MPX 2.0.

Type

event ConfigSaver.PropertyStatusEventHandler

Default

Null

Visual Basic

Syntax

Event PropertyStatusEvent(ByVal sender As Mpx.ConfigSaver, ByVal args As Mpx.ConfigSavePropertyStatusEventArgs)

Sample Code

 
Dim controller As Mpx.Controller = New Mpx.Controller(0)
Dim saver As Mpx.ConfigSaver = New Mpx.ConfigSaver()

' Have the OnSavePropertyError method handle 
' PropertyError(events)
AddHandler saver.PropertyErrorEvent, 
 AddressOf OnSavePropertyError

' Have the OnSavePropertyStatus method handle 
' PropertyStatus events
AddHandler saver.PropertyStatusEvent, 
 AddressOf OnSavePropertyStatus

saver.SaveToFile(controller, "controllerConfig.xml")


Sample Application

 

C#

Syntax

event PropertyStatusEventHandler PropertyStatusEvent

Sample Code

 

Mpx.Controller controller = new Mpx.Controller(0);
Mpx.ConfigSaver saver = new Mpx.ConfigSaver();

// Have the OnSavePropertyError method handle PropertyError events
saver.PropertyErrorEvent += OnSavePropertyError;

// Have the OnSavePropertyStatus method handle
// ConfigSavePropertyStatus events

saver.PropertyStatusEvent += OnSavePropertyStatus;

saver.SaveToFile(controller, "controllerConfig.xml");

See Also

ConfigSaver

PropertyStatusEventHandler
ConfigSavePropertyStatusEventArgs

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering