Example #1
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the Trigger class.
    /// </summary>
    public Trigger()
    {
      this.signaling = TriggerSignaling.None;
      this.outputDevice = TriggerOutputDevices.LPT;
      this.signalingTime = 40;
      this.signalValue = 255;
      this.portAddress = 0x0378;
    }
Example #2
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the Trigger class.
        /// </summary>
        public Trigger()
        {
            this.signaling     = TriggerSignaling.None;
            this.outputDevice  = TriggerOutputDevices.LPT;
            this.signalingTime = 40;
            this.signalValue   = 255;
            this.portAddress   = 0x0378;
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the Trigger class.
 /// </summary>
 /// <param name="newSignaling">The <see cref="TriggerSignaling"/> enumeration</param>
 /// <param name="newTriggerOutputDevice">The <see cref="TriggerOutputDevices"/> to send the trigger to.</param>
 /// <param name="newSignalingTime">An <see cref="int"/> with the time in milliseconds the trigger level should be set.</param>
 /// <param name="newValue">An 8-bit <see cref="int"/> (0-255) that indicates the value to be sent.</param>
 /// <param name="newPortAddress">An <see cref="int"/> with the port address to send the trigger to.</param>
 public Trigger(
     TriggerSignaling newSignaling,
     TriggerOutputDevices newTriggerOutputDevice,
     int newSignalingTime,
     int newValue,
     int newPortAddress)
 {
     this.signaling     = newSignaling;
     this.outputDevice  = newTriggerOutputDevice;
     this.signalingTime = newSignalingTime;
     this.signalValue   = newValue;
     this.portAddress   = newPortAddress;
 }
Example #4
0
        private Trigger GetTrigger()
        {
            Trigger returnTrigger = new Trigger();

            if (cbbTriggerDevice.SelectedItem != null)
            {
                returnTrigger.OutputDevice = (TriggerOutputDevices)Enum.Parse(typeof(TriggerOutputDevices), cbbTriggerDevice.SelectedItem.ToString());
            }
            else
            {
                returnTrigger.OutputDevice = TriggerOutputDevices.LPT;
            }
            TriggerSignaling signaling = TriggerSignaling.None;

            if (chbSendTrigger.Checked)
            {
                signaling = TriggerSignaling.Enabled;
            }
            returnTrigger.Signaling     = signaling;
            returnTrigger.SignalingTime = (int)nudTriggerSignalTime.Value;
            returnTrigger.Value         = (int)nudTriggerValue.Value;
            returnTrigger.PortAddress   = Convert.ToInt32(txbPortAddress.Text, 16);
            return(returnTrigger);
        }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the Trigger class.
 /// </summary>
 /// <param name="newSignaling">The <see cref="TriggerSignaling"/> enumeration</param>
 /// <param name="newTriggerOutputDevice">The <see cref="TriggerOutputDevices"/> to send the trigger to.</param>
 /// <param name="newSignalingTime">An <see cref="int"/> with the time in milliseconds the trigger level should be set.</param>
 /// <param name="newValue">An 8-bit <see cref="int"/> (0-255) that indicates the value to be sent.</param>
 /// <param name="newPortAddress">An <see cref="int"/> with the port address to send the trigger to.</param>
 public Trigger(
   TriggerSignaling newSignaling,
   TriggerOutputDevices newTriggerOutputDevice,
   int newSignalingTime,
   int newValue,
   int newPortAddress)
 {
   this.signaling = newSignaling;
   this.outputDevice = newTriggerOutputDevice;
   this.signalingTime = newSignalingTime;
   this.signalValue = newValue;
   this.portAddress = newPortAddress;
 }