public void inicializarKinect()
        {
            foreach (var potentialSensor in KinectSensor.KinectSensors)
            {
                if (potentialSensor.Status == KinectStatus.Connected)
                {
                    miKinect = potentialSensor;
                    KinectSensor.KinectSensors.StatusChanged += new EventHandler<StatusChangedEventArgs>(KinectSensors_StatusChanged);
                    break;
                }
            }

            if (miKinect != null)
            {
                try
                {
                    miKinect.Start();
                    trayBar.BalloonTipTitle = "Servidor Seguridad";
                    trayBar.BalloonTipText = "Servidor funcionando";
                    trayBar.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
                    trayBar.ShowBalloonTip(1000);
                    socketImagen.Cargar(miKinect);
                    esqueletos.Cargar(miKinect);
                    socketComunicacion= new SocketComunicacion(miKinect);
                    socketComunicacion.InitializeSockets();
                }
                catch (Exception)
                {
                    miKinect = null;
                }
            }
            else
            {
                trayBar.BalloonTipTitle = "Servidor kinect";
                trayBar.BalloonTipText = "Kinect no encontrado";
                trayBar.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Error;
                trayBar.ShowBalloonTip(1000);
            }
        }
        public void inicializarKinect()
        {
            foreach (var potentialSensor in KinectSensor.KinectSensors)
            {
                if (potentialSensor.Status == KinectStatus.Connected)
                {
                    miKinect = potentialSensor;
                    KinectSensor.KinectSensors.StatusChanged += new EventHandler <StatusChangedEventArgs>(KinectSensors_StatusChanged);
                    break;
                }
            }

            if (miKinect != null)
            {
                try
                {
                    miKinect.Start();
                    trayBar.BalloonTipTitle = "Servidor Seguridad";
                    trayBar.BalloonTipText  = "Servidor funcionando";
                    trayBar.BalloonTipIcon  = System.Windows.Forms.ToolTipIcon.Info;
                    trayBar.ShowBalloonTip(1000);
                    socketImagen.Cargar(miKinect);
                    esqueletos.Cargar(miKinect);
                    socketComunicacion = new SocketComunicacion(miKinect);
                    socketComunicacion.InitializeSockets();
                }
                catch (Exception)
                {
                    miKinect = null;
                }
            }
            else
            {
                trayBar.BalloonTipTitle = "Servidor kinect";
                trayBar.BalloonTipText  = "Kinect no encontrado";
                trayBar.BalloonTipIcon  = System.Windows.Forms.ToolTipIcon.Error;
                trayBar.ShowBalloonTip(1000);
            }
        }