コード例 #1
0
        public static bool FindXBox()
        {
            if (XBox == null)
            {
                XBox = new Xbox();
            }
            if (XBox.Ping() == false)
            {
                do
                {
                    if (AutoConnect)
                    {
                        AsyncConnect();
                    }
                    else
                    {
                        AsyncConnect(SelectedIP);
                    }

                    Cache.XBoxLocator.ShowDialog(); //Acts as wait

                    if (XBox.Connected)
                    {
                        return(true);
                    }
                }while (new Settings().ShowDialog() == DialogResult.OK);
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public static void FindXBox(string xbox)
        {
            _xbox = new Xbox();
            AsyncConnect(xbox);
            _xboxLocator.ShowDialog();

            if (XBox.Ping())
            {
                if (_mainWindow == null)
                {
                    _mainWindow = new Main();
                    _mainWindow.ShowDialog();
                    XBox.Disconnect();
                }
            }
            else
            {
                new Settings().ShowDialog();
            }
        }