Пример #1
0
 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();
 }
Пример #2
0
 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;
 }
Пример #3
0
 public static MainWindowViewModel GetMainWindowViewModel(MainWindowModel model, Dispatcher dispatcher, HidGuardianManager hidGuardianManager, UpdateChecker updateChecker, XOutputManager xOutputManager)
 {
     return(new MainWindowViewModel(model, dispatcher, updateChecker, hidGuardianManager, xOutputManager));
 }