Exemplo n.º 1
0
 /// <summary>
 /// Save the current unit file to disk. Will overwrite existing file unless newFileLoc is overwritten
 /// </summary>
 /// <param name="newFileLoc">Where to save the current unit file. Default is an empty string.
 /// Will overwrite existing file if not overwritten.</param>
 public void SaveUnitFile(string newFileLoc = "")
 {
     try
     {
         if (newFileLoc != "")
         {
             MainUnitFile.SetWriteFile(newFileLoc);
         }
         MainUnitFile.saveUnitFile();
     }
     catch
     {
         // Pass any exceptions to the controlling method
         throw;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// This method creates a backup of the currently selected file at the specified location.
 /// Can force an overwrite if desired.
 /// </summary>
 /// <param name="backupLoc">File location for the backup file to be written to</param>
 /// <param name="overwrite">Default false, if the method should overwrite an existing file</param>
 /// <returns>True a backup was created, false otherwise</returns>
 public bool createBackup(string backupLoc, bool overwrite = false)
 {
     // This is really just to expose UnitFile.createBackup to the app at large.
     return(MainUnitFile.createBackup(backupLoc, overwrite));
 }