/**************************************************************************/
        /* Event Handling */
        /**************************************************************************/

        /// <summary>
        /// Execute startup tasks
        /// </summary>
        /// <param name="sender">object sending the event</param>
        /// <param name="e">event arguments</param>
        /// <remarks>New modules should inherit from <see cref="Integration.Module"/> and should be instantiated here.</remarks>
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            // setup the virtual bus.
            _bus = new VirtualBus(Dispatcher);
            _bus.Subscribe(BusNode.STOP_REQUESTED, OnBusValueChanged);


            // setup the image
            DrawingGroup drawingGroup = new DrawingGroup();

            KinectRenderFeedback.Source = new DrawingImage(drawingGroup);

            // setup each of the modules.
            _modules = new List <Module>();

            // TODO: Add each module to the list here.
            _modules.Add(new PositionalTracker(drawingGroup));
            _modules.Add(new PositionFeedback(this.UpperArmOrientation, this.LowerArmOrientaiton, this.HandOrientation));
            _modules.Add(new RobotArmModule());
            _modules.Add(new GloveModule());

            // start everything!
            InitializeModules();
        }
 /**************************************************************************************/
 /* Public Methods */
 /**************************************************************************************/
 /// <summary>
 /// Requests that the module be initialized and begins communicating on the specified virtual bus.
 /// </summary>
 /// <param name="bus">The virtual bus to communicate on.</param>
 public void InitializeModule(VirtualBus bus)
 {
     Bus = bus;
     OnInitialize();
 }
        /**************************************************************************/
        /* Event Handling */
        /**************************************************************************/
        /// <summary>
        /// Execute startup tasks
        /// </summary>
        /// <param name="sender">object sending the event</param>
        /// <param name="e">event arguments</param>
        /// <remarks>New modules should inherit from <see cref="Integration.Module"/> and should be instantiated here.</remarks>
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            // setup the virtual bus.
            _bus = new VirtualBus(Dispatcher);
            _bus.Subscribe(BusNode.STOP_REQUESTED, OnBusValueChanged);

            // setup the image
            DrawingGroup drawingGroup = new DrawingGroup();
            KinectRenderFeedback.Source = new DrawingImage(drawingGroup);

            // setup each of the modules.
            _modules = new List<Module>();

            // TODO: Add each module to the list here.
            _modules.Add(new PositionalTracker(drawingGroup));
            _modules.Add(new PositionFeedback(this.UpperArmOrientation, this.LowerArmOrientaiton, this.HandOrientation));
            _modules.Add(new RobotArmModule());
            _modules.Add(new GloveModule());

            // start everything!
            InitializeModules();
        }