コード例 #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);
            }
        }
コード例 #2
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);
            }
        }
コード例 #3
0
ファイル: PoseSequence.cs プロジェクト: VuWall/VuWall-Motion
        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);
            }
        }
コード例 #4
0
ファイル: PoseSequenceExample.cs プロジェクト: rafme/MyoSharp
 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);
 }
コード例 #5
0
        private void PoseSequenceCompleted(object sender, PoseSequenceEventArgs e)
        {
            var sequence = (IPoseSequence)sender;

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