private void CheckExternalResources() // Used to check what is installed/available and what is not to handle the disabling/hiding of controls. { if (HIDGuardianAPI.IsViGEmBusInstalled()) { InstallViGEmBtn.Enabled = false; } else { UninstallViGEmBtn.Enabled = false; HIDerTab.SelectedIndex = 2; } if (HIDGuardianAPI.IsHidGuardianInstalled()) { InstallHidGuardianBtn.Enabled = false; } else { UninstallHidGuardianBtn.Enabled = false; HIDerTab.SelectedIndex = 2; } if (HIDGuardianAPI.IsHidCerberusAvailable(Application.StartupPath)) { if (HIDGuardianAPI.IsHidCerberusInstalled()) { InstallHidCerberusBtn.Enabled = false; if (HIDGuardianAPI.IsHidCerberusRunning()) { StartHidCerberusBtn.Enabled = false; } else { StopHidCerberusBtn.Enabled = false; } } else { UninstallHidCerberusBtn.Enabled = false; StartHidCerberusBtn.Enabled = false; StopHidCerberusBtn.Enabled = false; } } else { HidCerberusLbl.Visible = false; InstallHidCerberusBtn.Visible = false; UninstallHidCerberusBtn.Visible = false; StartHidCerberusBtn.Visible = false; StopHidCerberusBtn.Visible = false; } }