public void DisableCommandStatusCheck(OleMenuCommand disableCommand) { try { disableCommand.Enabled = false; foreach (var project in currentProjectFinder.GetCurrentProjects()) { var xmlForProject = LoadXmlForProject(project); if (xmlForProject != null) { if (containsFodyChecker.Check(xmlForProject)) { disableCommand.Enabled = true; return; } } } } catch (COMException exception) { exceptionDialog.HandleException(exception); } catch (Exception exception) { exceptionDialog.HandleException(exception); } }
public void ConfigureCallback() { try { var currentProjects = currentProjectFinder.GetCurrentProjects(); if (currentProjects .Any(UnsaveProjectChecker.HasUnsavedPendingChanges)) { return; } foreach (var project in currentProjects) { Configure(project); } } catch (COMException exception) { exceptionDialog.HandleException(exception); } catch (Exception exception) { exceptionDialog.HandleException(exception); } }
public void DisableCallback() { try { var projects = currentProjectFinder.GetCurrentProjects(); if (projects.Any(UnsaveProjectChecker.HasUnsavedPendingChanges)) { return; } foreach (var project in projects) { messageDisplayer.ShowInfo(string.Format("Fody: Removed from the project '{0}'. However no binary files will be removed in case they are being used by other projects.", project.Name)); new ProjectRemover(project.FullName); } } catch (COMException exception) { exceptionDialog.HandleException(exception); } catch (Exception exception) { exceptionDialog.HandleException(exception); } }