public InstallationStatusUpdater(IPlayniteAPI api) : base(api) { settings = new InstallationStatusUpdaterSettingsViewModel(this, PlayniteApi); Properties = new GenericPluginProperties { HasSettings = true }; SetDirWatchers(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(5000); timer.Tick += new EventHandler(Timer_Tick); }
public InstallationStatusUpdater(IPlayniteAPI api) : base(api) { settings = new InstallationStatusUpdaterSettingsViewModel(this, PlayniteApi); Properties = new GenericPluginProperties { HasSettings = true }; SetDirWatchers(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(5000); timer.Tick += new EventHandler(Timer_Tick); if (settings.Settings.UpdateStatusOnUsbChanges) { currentDevices = GetUSBDevices(); usbSearchertimer = new DispatcherTimer(); usbSearchertimer.Interval = TimeSpan.FromMilliseconds(5000); usbSearchertimer.Tick += new EventHandler(UsbTimer_Tick); usbSearchertimer.Start(); } }