EnvDTE.Documents.SaveAll()

Here are the examples of the csharp api class EnvDTE.Documents.SaveAll() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: vcc
Source File: VSIntegration.cs
View license
internal static bool DocumentsSavedCheck(VccOptionPage options) {
      if (DTE.Documents.Cast<Document>().All(document => document.Saved)) return true;

      if (options.SaveMode == SaveMode.Automatically) {
        DTE.Documents.SaveAll();
        return true;
      }
      
      if (MessageBox.Show(
        "There are unsaved changes. Press OK to save all documents and proceed with the verification.",
        "Unsaved Changes",
        MessageBoxButtons.OKCancel,
        MessageBoxIcon.Question,
        MessageBoxDefaultButton.Button1) == DialogResult.OK) {
          DTE.Documents.SaveAll();
          return true;
        }
      
      return false;
    }