/// <summary>
        ///     Execute start up tasks
        /// </summary>
        /// <param name="sender">object sending the event</param>
        /// <param name="e">event arguments</param>
        private void App_Startup(object sender, StartupEventArgs e)
        {
            ShutdownMode = ShutdownMode.OnLastWindowClose;

            // Initialize logger
            XmlConfigurator.Configure();
            Logger.Debug("App Startup");

            ConfigurationFlags = new Dictionary <JointType, bool>();


            // TODO: Add a flag to start up the simulator if desired -- should be a flag passable somehow @ app startup

            /*KinectSimulator kinectSimulator = new KinectSimulator(this.queue);
             * kinectSimulator.Top = 200;
             * kinectSimulator.Left = 600;
             * kinectSimulator.Show();*/

            var kinectProcessor = new KinectProcessor();

            var sessionManager = new SessionManager();

            var udpReceiver = new UDPReceiver(8080, sessionManager, kinectProcessor);

            // Initialize main GUI
            var configurationTool = new ConfigurationTool(sessionManager, kinectProcessor)
            {
                Top  = 0,
                Left = 0
            };

            configurationTool.Show();
        }
        /// <summary>
        ///     Execute start up tasks
        /// </summary>
        /// <param name="sender">object sending the event</param>
        /// <param name="e">event arguments</param>
        private void App_Startup(object sender, StartupEventArgs e)
        {
            ShutdownMode = ShutdownMode.OnLastWindowClose;

            // Initialize logger
            XmlConfigurator.Configure();
            Logger.Debug("App Startup");

            ConfigurationFlags = new Dictionary<JointType, bool>();


            // TODO: Add a flag to start up the simulator if desired -- should be a flag passable somehow @ app startup
            /*KinectSimulator kinectSimulator = new KinectSimulator(this.queue);
            kinectSimulator.Top = 200;
            kinectSimulator.Left = 600;
            kinectSimulator.Show();*/

            var kinectProcessor = new KinectProcessor();

			var sessionManager = new SessionManager();

			var udpReceiver = new UDPReceiver(8080, sessionManager, kinectProcessor);

            // Initialize main GUI
            var configurationTool = new ConfigurationTool(sessionManager, kinectProcessor)
            {
                Top = 0,
                Left = 0
            };
            configurationTool.Show();
        }
Example #3
0
        public DataSubscriber(ConfigFlags configurationFlags, KinectProcessor kinectProcessor, UDPSender dataSender)
        {
            _configurationFlags = configurationFlags;

            _dataSender = dataSender;
            _dataSender.StartDataOut();

            kinectProcessor.Reader.MultiSourceFrameArrived += MultiSourceFrameHandler;
        }
        public DataSubscriber(ConfigFlags configurationFlags, KinectProcessor kinectProcessor, UDPSender dataSender)
        {
            _configurationFlags = configurationFlags;

			_dataSender = dataSender;
			_dataSender.StartDataOut();

            kinectProcessor.Reader.MultiSourceFrameArrived += MultiSourceFrameHandler;
        }
		public UDPReceiver(int port, SessionManager sessionManager, KinectProcessor dataPub)
		{
			_port = port;
			_sessionManager = sessionManager;
			_dataPub = dataPub;
			_receiver = new OscReceiver(_port);
			_listenerThread = new Thread(new ThreadStart(ListenerWork));
			_receiver.Connect();
			_listenerThread.Start();
		}
Example #6
0
 public UDPReceiver(int port, SessionManager sessionManager, KinectProcessor dataPub)
 {
     _port           = port;
     _sessionManager = sessionManager;
     _dataPub        = dataPub;
     _receiver       = new OscReceiver(_port);
     _listenerThread = new Thread(new ThreadStart(ListenerWork));
     _receiver.Connect();
     _listenerThread.Start();
 }
        public SessionWorker(string ip, int sendPort, KinectProcessor dataPub, SessionManager sessionManager)
        {
            _ip         = ip;
            _port       = sendPort;
            _udpSender  = new UDPSender(_ip, _port);
            _endSession = false;

            _sessionManager = sessionManager;
            _dataPub        = dataPub;
            _configFlags    = new ConfigFlags();
            _lookupFlags    = new ConfigFlags();
            _flagIterator   = new ConfigFlags();
            _dataSub        = new DataSubscriber(_configFlags, _dataPub, _udpSender);
        }
		public SessionWorker(string ip, int sendPort, KinectProcessor dataPub, SessionManager sessionManager)
		{
			_ip = ip;
			_port = sendPort;
			_udpSender = new UDPSender(_ip, _port);
			_endSession = false;

			_sessionManager = sessionManager;
			_dataPub = dataPub;
			_configFlags = new ConfigFlags();
			_lookupFlags = new ConfigFlags();
			_flagIterator = new ConfigFlags();
			_dataSub = new DataSubscriber(_configFlags, _dataPub, _udpSender);
		}
        public ConfigurationTool(SessionManager sessionManager, KinectProcessor kinectProcessor)
        {
            InitializeComponent();

            _sessionManager = sessionManager;

            _coordinateMapper = kinectProcessor.CoordinateMapper;
            kinectProcessor.Reader.MultiSourceFrameArrived += Reader_MultiSourceFrameArrived;
            _localSessions = new List<TabData>();
            _tabList = new TabList();

            // Start timer for flag updating thread
            _timer = new Timer(TimerTick, null, 0, 100);
            _thread = new Thread(updateFlags);
        }
        public ConfigurationTool(SessionManager sessionManager, KinectProcessor kinectProcessor)
        {
            InitializeComponent();

            _sessionManager = sessionManager;

            _coordinateMapper = kinectProcessor.CoordinateMapper;
            kinectProcessor.Reader.MultiSourceFrameArrived += Reader_MultiSourceFrameArrived;
            _localSessions = new List <TabData>();
            _tabList       = new TabList();

            // Start timer for flag updating thread
            _timer  = new Timer(TimerTick, null, 0, 100);
            _thread = new Thread(updateFlags);
        }