public MainWindowViewModel(MainWindowModel model, Dispatcher dispatcher, UpdateChecker updateChecker, HidGuardianManager hidGuardianManager, XOutputManager xOutputManager) : base(model) { this.dispatcher = dispatcher; this.updateChecker = updateChecker; this.hidGuardianManager = hidGuardianManager; this.xOutputManager = xOutputManager; timer.Interval = TimeSpan.FromMilliseconds(10000); timer.Tick += (object sender1, EventArgs e1) => { RefreshGameControllers(); }; timer.Start(); }
public GameController(InputMapper mapper) { this.mapper = mapper; xOutputManager = ApplicationContext.Global.Resolve <XOutputManager>(); xInput = new XOutputDevice(mapper); if (!string.IsNullOrEmpty(mapper.ForceFeedbackDevice)) { var device = InputDevices.Instance.GetDevices().OfType <DirectDevice>().FirstOrDefault(d => d.UniqueId == mapper.ForceFeedbackDevice); if (device != null) { ForceFeedbackDevice = device; } } running = false; }
public static MainWindowViewModel GetMainWindowViewModel(MainWindowModel model, Dispatcher dispatcher, HidGuardianManager hidGuardianManager, UpdateChecker updateChecker, XOutputManager xOutputManager) { return(new MainWindowViewModel(model, dispatcher, updateChecker, hidGuardianManager, xOutputManager)); }