// This method handles PropertyStatus events that occur while loading
// configuration to an object.
public void OnLoadPropertyStatus(Mpx.ConfigLoader loader,
Mpx.ConfigLoadPropertyStatusEventArgs e)
{
string msg;
// Print the current property and the percentage done
// Example output:
// 25%: Controller.Axis[2].AmpDisableAction
// Current Value: None
// New Value: CmdEqAct
msg = e.PercentageDone
+ "%: "
+ e.PropertyPath
+ "\n";
if (e.NewValueText != e.CurrentValueText)
{
// The property value is going to change. Display the current value
// and the new value.
msg += " Current Value: "
+ e.CurrentValueText
+ "\n New Value: "
+ e.NewValueText
+ "\n";
}
System.Console.Write(msg);
}
|