コード例 #1
0
        /// <summary>
        /// The potentiometer base wiper action event handler. This sets the channel
        /// value for either volatile or non-volatile wipers (depending on volatilty
        /// mode).
        /// </summary>
        /// <param name="sender">
        /// The object that fired the event.
        /// </param>
        /// <param name="e">
        /// The event arguments.
        /// </param>
        private void MicrochipPotentiometerBase_WiperActionEvent(object sender, WiperEventArgs e)
        {
            // Do nothing if no event specified.
            if (e == null)
            {
                return;
            }

            // For volatile wiper.
            switch (this._nonVolMode)
            {
            case MicrochipPotNonVolatileMode.VolatileOnly:
            case MicrochipPotNonVolatileMode.VolatileAndNonVolatile:
                e.SetChannelValue(MicrochipPotDeviceController.VOLATILE_WIPER);
                break;

            case MicrochipPotNonVolatileMode.NonVolatileOnly:
            default:
                break;
            }

            // For non-volatile wiper.
            switch (this._nonVolMode)
            {
            case MicrochipPotNonVolatileMode.NonVolatileOnly:
            case MicrochipPotNonVolatileMode.VolatileAndNonVolatile:
                e.SetChannelValue(MicrochipPotDeviceController.NONVOLATILE_WIPER);
                break;

            case MicrochipPotNonVolatileMode.VolatileOnly:
            default:
                break;
            }
        }
コード例 #2
0
 /// <summary>
 /// Raises the wiper action event event.
 /// </summary>
 /// <param name="e">
 /// The wiper event arguments.
 /// </param>
 private void OnWiperActionEvent(WiperEventArgs e)
 {
     if (this.WiperActionEvent != null)
     {
         this.WiperActionEvent(this, e);
     }
 }
コード例 #3
0
		/// <summary>
		/// The potentiometer base wiper action event handler. This sets the channel
		/// value for either volatile or non-volatile wipers (depending on volatilty
		/// mode).
		/// </summary>
		/// <param name="sender">
		/// The object that fired the event.
		/// </param>
		/// <param name="e">
		/// The event arguments.
		/// </param>
		private void MicrochipPotentiometerBase_WiperActionEvent(object sender, WiperEventArgs e)
		{
			// Do nothing if no event specified.
			if (e == null) {
				return;
			}

			// For volatile wiper.
			switch (this._nonVolMode) {
				case MicrochipPotNonVolatileMode.VolatileOnly:
				case MicrochipPotNonVolatileMode.VolatileAndNonVolatile:
					e.SetChannelValue(MicrochipPotDeviceController.VOLATILE_WIPER);
					break;
				case MicrochipPotNonVolatileMode.NonVolatileOnly:
				default:
					break;
			}

			// For non-volatile wiper.
			switch (this._nonVolMode) {
				case MicrochipPotNonVolatileMode.NonVolatileOnly:
				case MicrochipPotNonVolatileMode.VolatileAndNonVolatile:
					e.SetChannelValue(MicrochipPotDeviceController.NONVOLATILE_WIPER);
					break;
				case MicrochipPotNonVolatileMode.VolatileOnly:
				default:
					break;
			}
		}
コード例 #4
0
		/// <summary>
		/// Raises the wiper action event event.
		/// </summary>
		/// <param name="e">
		/// The wiper event arguments.
		/// </param>
		private void OnWiperActionEvent(WiperEventArgs e) {
			if (this.WiperActionEvent != null) {
				this.WiperActionEvent(this, e);
			}
		}