AGS.Editor.AGSEditor.AttemptToGetWriteAccess C# (CSharp) Method

AttemptToGetWriteAccess() public method

Attempt to get write access to the specified file. If this fails, a dialog will be displayed to the user and false will be returned.
public AttemptToGetWriteAccess ( string fileName ) : bool
fileName string
return bool
        public bool AttemptToGetWriteAccess(string fileName)
        {
            List<string> fileNames = new List<string>();
            fileNames.Add(fileName);
            return AttemptToGetWriteAccess(fileNames);
        }

Same methods

AGSEditor::AttemptToGetWriteAccess ( IList fileNames ) : bool

Usage Example

Example #1
0
 private void scintilla_AttemptModify(ref bool allowModify)
 {
     if (AttemptToEditScript != null)
     {
         AttemptToEditScript(ref allowModify);
         if (!allowModify)
         {
             return;
         }
     }
     if (!_agsEditor.AttemptToGetWriteAccess(_script.FileName))
     {
         allowModify = false;
     }
 }