Beispiel #1
0
        /// <summary>
        /// Creates a <see cref="SequenceGesture"/> instance
        /// with a variable list of <see cref="IGesture"/> instances.
        /// </summary>
        /// <param name="gestures">
        /// gestures to execute in sequence.
        /// </param>
        /// <returns>
        /// A <see cref="SequenceGesture"/> instance</returns>
        public SequenceGesture Sequence(params IGesture[] gestures)
        {
            if (gestures.Length == 0)
            {
                throw new ArgumentException("Length is 0", "gestures");
            }

            SequenceGesture seq = new SequenceGesture(this.form);

            foreach (GestureBase g in gestures)
            {
                seq.Gestures.Add(g);
            }
            return(seq);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a <see cref="SequenceGesture"/> instance
        /// with a variable list of <see cref="IGesture"/> instances.
        /// </summary>
        /// <param name="gestures">
        /// gestures to execute in sequence.
        /// </param>
        /// <returns>
        /// A <see cref="SequenceGesture"/> instance</returns>
        public SequenceGesture Sequence(params IGesture[] gestures)
        {
            if (gestures.Length == 0)
                throw new ArgumentException("Length is 0", "gestures");

            SequenceGesture seq = new SequenceGesture(this.form);
            foreach (GestureBase g in gestures)
            {
                seq.Gestures.Add(g);
            }
            return seq;
        }