protected virtual void OnFormCloseSerialization(object sender, CancelEventArgs e) { if (SaveSettings != null) { SerializationEventArgs ev = new SerializationEventArgs(Storage, this); SaveSettings(this, ev); } }
protected virtual void OnFormLoadSerialization(object sender, EventArgs e) { if (RecoverSettings != null) { SerializationEventArgs ev = new SerializationEventArgs(Storage, this); #if RELEASE try { #endif RecoverSettings(this, ev); #if RELEASE } catch (Exception ex) // catch any recovery exception { Trace.WriteLine(ex.Message + "\r\n" + ex.StackTrace, "Serialization Recovery FATAL"); } #endif } }
protected virtual void OnFormLoadSerialization( object sender, EventArgs e ) { if( RecoverSettings != null ) { SerializationEventArgs ev = new SerializationEventArgs( Storage, this ); #if RELEASE try { #endif RecoverSettings( this, ev ); #if RELEASE } catch( Exception ex ) // catch any recovery exception { Trace.WriteLine( ex.Message + "\r\n" + ex.StackTrace, "Serialization Recovery FATAL" ); } #endif } }
protected virtual void OnFormCloseSerialization( object sender, CancelEventArgs e ) { if( SaveSettings != null ) { SerializationEventArgs ev = new SerializationEventArgs( Storage, this ); SaveSettings( this, ev ); } }