Exemplo n.º 1
0
        IEnumerator <ITask> JoystickReplaceHandler(game.Replace replace)
        {
            if (_driveControl != null)
            {
                WinFormsServicePort.FormInvoke(
                    delegate()
                {
                    _driveControl.UpdateJoystickButtons(replace.Body.Buttons);
                    _driveControl.UpdateJoystickAxes(replace.Body.Axes);
                }
                    );
            }

            yield break;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handle Joystick Replace messages
        /// </summary>
        /// <param name="replace">The replace message</param>
        /// <returns>An Iterator</returns>
        private IEnumerator <ITask> JoystickReplaceHandler(game.Replace replace)
        {
            var p = (Port <game.Replace>) this.gameControllerNotify[typeof(game.Replace)];

            if (p.ItemCount > 10)
            {
                Console.WriteLine("Joystick backlog: " + p.ItemCount);
            }

            if (this.dashboardForm != null)
            {
                WinFormsServicePort.FormInvoke(
                    delegate
                {
                    this.dashboardForm.UpdateJoystickButtons(replace.Body.Buttons);
                    this.dashboardForm.UpdateJoystickAxes(replace.Body.Axes);
                });
            }

            yield break;
        }
 public void ReplaceHandler(gc.Replace replace)
 {
     _state = replace.Body;
     replace.ResponsePort.Post(DefaultReplaceResponseType.Instance);
     SendNotification(_subMgr, replace);
 }