Fireplace state change event arguments.
상속: System.EventArgs
예제 #1
0
 /// <summary>
 /// Raises the state changed event.
 /// </summary>
 /// <param name="e">
 /// The event arguments.
 /// </param>
 protected virtual void OnStateChanged(FireplaceStateChangedEventArgs e)
 {
     if (this.StateChanged != null)
     {
         this.StateChanged(this, e);
     }
 }
예제 #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);
        }
예제 #3
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);
		}
예제 #4
0
 /// <summary>
 /// An internal handler for the state change event.
 /// </summary>
 /// <param name="sender">
 /// The object raising the event (ourself).
 /// </param>
 /// <param name="e">
 /// The event arguments.
 /// </param>
 private void InternalStateChangeHandler(Object sender, FireplaceStateChangedEventArgs e)
 {
     this.CancelTimeoutTask();
 }
예제 #5
0
		/// <summary>
		/// An internal handler for the state change event.
		/// </summary>
		/// <param name="sender">
		/// The object raising the event (ourself).
		/// </param>
		/// <param name="e">
		/// The event arguments.
		/// </param>
		private void InternalStateChangeHandler(Object sender, FireplaceStateChangedEventArgs e) {
			this.CancelTimeoutTask();
		}
예제 #6
0
		/// <summary>
		/// Raises the state changed event.
		/// </summary>
		/// <param name="e">
		/// The event arguments.
		/// </param>
		protected virtual void OnStateChanged(FireplaceStateChangedEventArgs e) {
			if (this.StateChanged != null) {
				this.StateChanged(this, e);
			}
		}