void ControllerLoop()
        {
            if (XBoxIO.FindXBox())
            {
                if (XBoxIO.XBox.Gamepad == null)
                {
                    MessageBox.Show("Unable To Access Gamepad", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Application.Exit();
                    return;
                }
                else
                {
                    XBoxIO.XBox.Gamepad.InitializeControllerHook();
                    XBoxIO.XBox.Gamepad.OverrideControllers(true);
                }
            }
            else
            {
                Application.Exit();
                return;
            }

            running = true;
            while (running)
            {
                AcceptKeyboardInput(input, inputState);
                AcceptMouseInput(input, inputState);
            }
        }
示例#2
0
        void StartStream()
        {
            lock (XBoxIO.XBox)
            {
                if (XBoxIO.XBox.Connected == false && XBoxIO.FindXBox() == false)
                {
                    checkLiveStream.Text = "Live Stream (Off)";
                    return;
                }

                if (videoStream != null)
                {
                    videoStream.End();
                }

                videoStream = new XboxVideoStream(XBoxIO.XBox,
                                                  (XboxVideoStream.VideoSize)cboStreamSize.SelectedItem,
                                                  XboxVideoStream.VideoQuality.Regular,
                                                  (XboxVideoStream.VideoPresentationInterval)cboFrameInterval.SelectedItem);

                videoStream.Begin();

                checkLiveStream.Text = "Live Stream (On)";
            }
        }
 private void cmdApply_Click(object sender, EventArgs e)
 {
     if (XBoxIO.FindXBox() == false)
     {
         return;
     }
     XBoxIO.XBox.SetLEDState((LEDState)cboState1.SelectedItem, (LEDState)cboState2.SelectedItem, (LEDState)cboState3.SelectedItem, (LEDState)cboState4.SelectedItem);
 }
 bool FindXbox()
 {
     Enabled = false;
     if (XBoxIO.FindXBox() == false)
     {
         Enabled = true;
         return(false);
     }
     return(true);
 }
        public SystemProperties()
        {
            InitializeComponent();

            if (XBoxIO.FindXBox() == false)
            {
                Close();
            }
            xboxProperties.SelectedObject = XBoxIO.XBox;
        }
        void cmdReset_Click(object sender, EventArgs e)
        {
            if (FindXbox() == false)
            {
                return;
            }

            XBoxIO.XBox.Reset();
            XBoxIO.FindXBox();

            CompletedOperation();
        }
示例#7
0
        static void Main()
        {
            Control.CheckForIllegalCrossThreadCalls = false;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            XBoxIO.LoadSettings();
            if (XBoxIO.FindXBox())
            {
                ShowController();
            }
        }
示例#8
0
        void ResumeStream()
        {
            lock (XBoxIO.XBox)
            {
                if (XBoxIO.XBox.Connected == false && XBoxIO.FindXBox() == false)
                {
                    checkLiveStream.Text = "Live Stream (Off)";
                    return;
                }

                LiveStreamPaused = false;
                videoStream.Restart();
                checkLiveStream.Text = "Live Stream (On)";
            }
        }
        void cmdCyclePower_Click(object sender, EventArgs e)
        {
            if (FindXbox() == false)
            {
                return;
            }

            try { XBoxIO.XBox.DmReboot(BootFlag.Cold, null); }
            catch { }
            finally
            {
                XBoxIO.FindXBox();
            }

            CompletedOperation();
        }
示例#10
0
        static void Main()
        {
            Control.CheckForIllegalCrossThreadCalls = false;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoadExecutables();

            _LEDStateChanger = new LEDStateChanger();
            _memoryHacker    = new MemoryHacker();

            XBoxIO.LoadSettings();
            if (XBoxIO.FindXBox())
            {
                ShowXBoxExplorer();
            }
        }