} //Event: HexFileParse //--------------------------------------------------------------------- // Event: FileValidate //--------------------------------------------------------------------- protected internal void OnHexFileValidate(clsHexFileValidateEventArgs e) { // Event will be null if no client has hooked up a delegate to the event if (HexFileValidate != null) { HexFileValidate(this, e); } } //Event: FileValidated
void objHex_HexFileValidate(object sender, clsHexFileValidateEventArgs e) { switch (e.eventType) { case clsHexFileValidateEventArgs.EventType.started: txtInfo.Text += "Validating hex-file..." + Environment.NewLine; break; case clsHexFileValidateEventArgs.EventType.failed: txtInfo.Text += e.message + Environment.NewLine; break; case clsHexFileValidateEventArgs.EventType.success: txtInfo.Text += "ok"; break; default: txtInfo.Text += "Unknown hex validate event" + Environment.NewLine; break; } }
//--------------------------------------------------------------------- // Event: FileValidate //--------------------------------------------------------------------- protected internal void OnHexFileValidate( clsHexFileValidateEventArgs e ) { // Event will be null if no client has hooked up a delegate to the event if ( HexFileValidate != null ) { HexFileValidate( this, e ); } }
}//Hex_Parse() //--------------------------------------------------------------------- // Hex_Validate() //--------------------------------------------------------------------- private void Hex_Validate( object obj, clsHexFileValidateEventArgs e ) { if ( e.eventType == clsHexFileValidateEventArgs.EventType.started ) { clsDebugTextbox.OutputInfo( "Validating hex-file...", e.tabLevel ); } else if ( e.eventType == clsHexFileValidateEventArgs.EventType.failed ) { clsDebugTextbox.OutputError( e.message ); } else if ( e.eventType == clsHexFileValidateEventArgs.EventType.success ) { clsDebugTextbox.OutputSuccess( "ok" ); } }//Hex_Validate()