コード例 #1
0
        private static void InitYeloDebug(string IP)
        {
            xboxDebug = new YeloDebug.Xbox();
            // Do we really need a 5 second timeout period? How about half that?
            xboxDebug.Timeout = 2500;

            // If we are presented with an IP, use it
            if (IP.Split('.').Length == 4)
            {
                xboxDebug.ConnectToIP(IP);
            }
            // otherwise, use auto-detect
            else
            {
                System.Collections.Generic.List <DebugConnection> cons = xboxDebug.QueryXboxConnections();
                xboxDebug.Connect(cons[0].Name);
            }
            _debugName = xboxDebug.DebugName;
            _debugIP   = xboxDebug.DebugIP.ToString();
        }
コード例 #2
0
        static void WatchHalo2()
        {
            Xbox notifer = new Xbox();

            notifer.ConnectToIP(XBox.DebugIP.ToString());
            notifer.EnableNotificationSession = true;
            notifer.RegisterNotificationSession();
            while (MainThreadRunning)
            {
                notifer.ReceiveNotifications();
                foreach (string note in notifer.Notifications)
                {
                    if (note == "Test")
                    {
                        bool test = true;
                    }
                }
                notifer.Notifications.Clear();
            }
            notifer.Disconnect();
        }