Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                myConectorHub = new ConnectorHub.ConnectorHub();

                myConectorHub.Init();
                setValuesNames();
                myConectorHub.SendReady();

                myConectorHub.StartRecordingEvent += MyConectorHub_startRecordingEvent;
                myConectorHub.StopRecordingEvent  += MyConectorHub_stopRecordingEvent;
                myFeedbackHub = new ConnectorHub.FeedbackHub();
                myFeedbackHub.Init();
                myFeedbackHub.FeedbackReceivedEvent += MyFeedbackHub_FeedbackReceivedEvent;
            }
            catch (Exception e)
            {
                int x = 1;
            }

            storingAndSending = new Thread(new ThreadStart(storingAndSendingStart));
            storingAndSending.Start();
        }
Beispiel #2
0
 public MyoManager()
 {
     myConnector = new ConnectorHub.ConnectorHub();
     myConnector.init();
     myFeedback = new ConnectorHub.FeedbackHub();
     myFeedback.init();
     myConnector.sendReady();
 }
        public MyoViewModel()
        {
            this.TimerStart = DateTime.Now;
            myConnector     = new ConnectorHub.ConnectorHub();
            myFeedback      = new ConnectorHub.FeedbackHub();
            myConnector.init();
            myFeedback.init();
            myConnector.sendReady();
            myConnector.startRecordingEvent  += MyConnector_startRecordingEvent;
            myConnector.stopRecordingEvent   += MyConnector_stopRecordingEvent;
            myFeedback.feedbackReceivedEvent += MyFeedback_feedbackReceivedEvent;

            myoManager.AccelerometerChanged += UpdateAccelerometer;
            myoManager.GyroscopeChanged     += UpdateGyroscope;
            myoManager.OrientationChanged   += UpdateOrientation;
            myoManager.EMGChanged           += UpdateEMG;

            setValueNames();
        }
        public MainWindow()
        {
            InitializeComponent();
            myoManager.InitMyoManagerHub(this);
            try
            {
                myConnector = new ConnectorHub.ConnectorHub();
                myConnector.init();
                myConnector.startRecordingEvent += MyConnector_startRecordingEvent;
                myConnector.stopRecordingEvent  += MyConnector_stopRecordingEvent;
                myConnector.sendReady();
                setValueNames();

                myFeedback = new ConnectorHub.FeedbackHub();
                myFeedback.init();
                myFeedback.feedbackReceivedEvent += MyFeedback_feedbackReceivedEvent;
            }
            catch (Exception e)
            {
            }
        }