Example #1
0
 internal void V1Save(string newName)
 {
     if (_v1Task != null)
     {
         Triggers.Bind();
         var file = (IPersistFile)_v1Task;
         if (string.IsNullOrEmpty(newName) || newName == _v1Name)
         {
             try { file.Save(null, false); file = null; }
             catch { }
         }
         else
         {
             string str;
             file.GetCurFile(out str);
             File.Delete(str);
             str = string.Concat(new object[] { Path.GetDirectoryName(str), Path.DirectorySeparatorChar, newName, Path.GetExtension(str) });
             File.Delete(str);
             file.Save(str, true);
             file = null;
         }
     }
 }