public MainWindow()
        {
            InitializeComponent();
            i = 0;
            var videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);

            videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString);

            videoSource.NewFrame += VideoSource_NewFrame;
            videoSource.Start();

            initalizeAudioStuff();
            try
            {
                myConnector = new ConnectorHub.ConnectorHub();
                myConnector.Init();
                myConnector.amIvideo = true;
                myConnector.SendReady();


                myConnector.StartRecordingEvent += MyConnector_startRecordingEvent;
                myConnector.StopRecordingEvent  += MyConnector_stopRecordingEvent;
            }
            catch
            {
            }


            this.Closing += MainWindow_Closing;
        }
Exemple #2
0
        static void Main(string[] args)
        {
            try
            {
                int i = 0;
                myConnector = new ConnectorHub.ConnectorHub();

                myConnector.Init();
                setValueNames();

                myConnector.StartRecordingEvent += MyConnector_startRecordingEvent;
                myConnector.StopRecordingEvent  += MyConnector_stopRecordingEvent;
            }
            catch
            {
            }

            // setValueNames();
            controller             = new Controller();
            listener               = new SampleListener();
            controller.Connect    += listener.OnServiceConnect;
            controller.Device     += listener.OnConnect;
            controller.FrameReady += listener.OnFrame;



            // Keep this process running until Enter is pressed
            Console.WriteLine("Press Enter to quit...");
            Console.ReadLine();

            // controller.RemoveListener(listener);
            controller.Dispose();
        }
Exemple #3
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();
        }
Exemple #4
0
        public MainWindowViewModel()
        {
            mySpeechManager = SpeechManager.Instance;
            myConnectorHub  = new ConnectorHub.ConnectorHub();
            myConnectorHub.Init();
            myConnectorHub.SendReady();

            //VMCollection = new ViewModelBase[]
            //{
            //    expertViewModel, studentViewModel
            //};


            ExpertButtonCommand  = new RelayCommand(() => OnNav("Expert"), false);
            StudentButtonCommand = new RelayCommand(() => OnNav("Student"), false);
            CloseButtonCommand   = new RelayCommand(() => CloseApplication(), false);
            MessengerInstance.Register <string>(this, "DebugMessage", (debug => SetDebugText(debug)));
            CurrentViewModel = this;
        }