/// <summary> /// Fires an initialized event. /// </summary> /// <param name="e">The <see cref="BrailleIO.Interface.BrailleIO_Initialized_EventArgs"/> instance containing the event data.</param> protected virtual void fireClosed(BrailleIO_Initialized_EventArgs e = null) { if (closed != null) { if (e == null) { e = new BrailleIO_Initialized_EventArgs(this.Device); } closed(this, e); } }
/// <summary> /// Handles the initialized event of the adapter control. /// Happens if an adapter was started and has finished his initialization routines - is now ready for use. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="BrailleIO_Initialized_EventArgs"/> instance containing the event data.</param> void adapter_initialized(object sender, BrailleIO_Initialized_EventArgs e) { // example: send an auditory information to the user for this new device. if (sender != null && audio != null && ll != null) { String adptrName = String.Empty; if (sender is IBrailleIOAdapter && ((IBrailleIOAdapter)sender).Device != null) { adptrName = ((IBrailleIOAdapter)sender).Device.Name; } } }
/// <summary> /// Fires an initialized event. /// </summary> /// <param name="e">The <see cref="BrailleIO.Interface.BrailleIO_Initialized_EventArgs"/> instance containing the event data.</param> protected virtual void fireInitialized(BrailleIO_Initialized_EventArgs e = null) { if (initialized != null) { try { if (e == null) { e = new BrailleIO_Initialized_EventArgs(this.Device); } initialized(this, new BrailleIO_Initialized_EventArgs(this.Device)); } catch { } } }