/// <summary> /// Adds an application to manage to the drop down menu. /// </summary> private int AddApplicationToManage(FileInfo fileInfo) { // ignore files that don't exist. if (fileInfo == null || !fileInfo.Exists) { return(ApplicationToManageCB.SelectedIndex); } try { ManagedApplication application = ManagedApplication.Load(fileInfo.FullName); if (application == null) { return(ApplicationToManageCB.SelectedIndex); } // add to list. return(AddApplicationToManage(application)); } // ignore errors. catch (Exception) { return(ApplicationToManageCB.SelectedIndex); } }