Beispiel #1
0
        protected virtual void OnPoseSequenceCompleted(IMyo myo, DateTime timestamp, IList <Pose> poses)
        {
            var handler = PoseSequenceCompleted;

            if (handler != null)
            {
                var args = new PoseSequenceEventArgs(
                    myo,
                    timestamp,
                    poses);
                handler.Invoke(this, args);
            }
        }
        protected virtual void OnPoseSequenceCompleted(IMyo myo, DateTime timestamp, IList <Pose> poses)
        {
            // Contract.Requires<ArgumentNullException>(myo != null, "myo");
            // Contract.Requires<ArgumentNullException>(poses != null, "poses");
            // Contract.Requires<ArgumentException>(poses.Count > 0, "The sequence must contain at least one pose.");

            var handler = PoseSequenceCompleted;

            if (handler != null)
            {
                var args = new PoseSequenceEventArgs(
                    myo,
                    timestamp,
                    poses);
                handler.Invoke(this, args);
            }
        }
Beispiel #3
0
        protected virtual void OnPoseSequenceCompleted(IMyo myo, DateTime timestamp, IList<Pose> poses)
        {
            Contract.Requires<ArgumentNullException>(myo != null, "myo");
            Contract.Requires<ArgumentNullException>(poses != null, "poses");
            Contract.Requires<ArgumentException>(poses.Count > 0, "The sequence must contain at least one pose.");

            var handler = PoseSequenceCompleted;
            if (handler != null)
            {
                var args = new PoseSequenceEventArgs(
                    myo,
                    timestamp,
                    poses);
                handler.Invoke(this, args);
            }
        }
Beispiel #4
0
 private static void Sequence_PoseSequenceCompleted(object sender, PoseSequenceEventArgs e)
 {
     Console.WriteLine("{0} arm Myo has performed a pose sequence!", e.Myo.Arm);
     e.Myo.Vibrate(VibrationType.Medium);
 }
        private void PoseSequenceCompleted(object sender, PoseSequenceEventArgs e)
        {
            var sequence = (IPoseSequence)sender;

            if (PoseSequenceToSound.ContainsKey(sequence))
                PoseSequenceToSound[sequence].Play();
        }