public ImageSource Convert(GameControllerEventType eventType) { switch (eventType) { case GameControllerEventType.Button: return(ImageSource.FromResource($"{ResourceHelper.ImageResourceRootNameSpace}.ic_buttons.png")); case GameControllerEventType.Axis: return(ImageSource.FromResource($"{ResourceHelper.ImageResourceRootNameSpace}.ic_joystick.png")); default: return(null); } }
public ImageSource Convert(GameControllerEventType eventType) { switch (eventType) { case GameControllerEventType.Button: return(ResourceHelper.GetImageResource("ic_buttons.png")); case GameControllerEventType.Axis: return(ResourceHelper.GetImageResource("ic_joystick.png")); default: return(null); } }
public GameControllerEventArgs(GameControllerEventType eventType, string eventCode, float value) { var events = new Dictionary <(GameControllerEventType, string), float>(); events[(eventType, eventCode)] = value;
public GameControllerEventViewModel(GameControllerEventType eventType, string eventCode, float value) { EventType = eventType; EventCode = eventCode; Value = value; }
public async Task <ControllerEvent> AddOrGetControllerEventAsync(ControllerProfile controllerProfile, GameControllerEventType eventType, string eventCode) { using (await _asyncLock.LockAsync()) { var controllerEvent = controllerProfile.ControllerEvents.FirstOrDefault(ce => ce.EventType == eventType && ce.EventCode == eventCode); if (controllerEvent == null) { controllerEvent = new ControllerEvent { EventType = eventType, EventCode = eventCode }; await _creationRepository.InsertControllerEventAsync(controllerProfile, controllerEvent); } return(controllerEvent); } }
public GameControllerEventDialogResult(bool isOk, GameControllerEventType eventType, string eventCode) { IsOk = isOk; EventType = eventType; EventCode = eventCode; }