Relay state changed event arguments class.
Inheritance: System.EventArgs
Ejemplo n.º 1
0
 /// <summary>
 /// Raises the state changed event.
 /// </summary>
 /// <param name="e">
 /// The event arguments.
 /// </param>
 protected virtual void OnStateChanged(RelayStateChangedEventArgs e)
 {
     if (this.StateChanged != null)
     {
         this.StateChanged(this, e);
     }
 }
Ejemplo n.º 2
0
		/// <summary>
		/// Internal event handler for the relay state changed event.
		/// This fires the fireplace state changed event when the
		/// relay's state changes.
		/// </summary>
		/// <param name="sender">
		/// The object raising the event (a reference to the relay object).
		/// </param>
		/// <param name="e">
		/// The event arguments.
		/// </param>
		private void InternalHandleRelayStateChange(Object sender, RelayStateChangedEventArgs e) {
			FireplaceStateChangedEventArgs stateChangeEvent = null;
			if (e.NewState == this._fireplaceOnRelayState) {
				stateChangeEvent = new FireplaceStateChangedEventArgs(FireplaceState.Off, FireplaceState.On);
			}
			else {
				stateChangeEvent = new FireplaceStateChangedEventArgs(FireplaceState.On, FireplaceState.Off);
			}

			base.OnStateChanged(stateChangeEvent);
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Raises the state changed event.
		/// </summary>
		/// <param name="e">
		/// The event arguments.
		/// </param>
		protected virtual void OnStateChanged(RelayStateChangedEventArgs e) {
			if (this.StateChanged != null) {
				this.StateChanged(this, e);
			}
		}