public void TestPathStringRight() { string path = @"\Desktop"; string filename = "test"; string returnvalue = @"\Desktop\test"; Assert.AreEqual(ValidateInput.PathString(filename, path), returnvalue); }
/// <summary> /// Gets called when a project needs to be created. /// </summary> /// <param name="filename"></param> /// <param name="destination"></param> /// <returns>bool: went well/bad</returns> public static void Create(string filename, string destination) { string pathstring = ValidateInput.PathString(filename, destination); CreateFolder(pathstring); DiffusionCurves.Auxillary.LoadSave.ZipFolderRenameToDCIP(pathstring); DiffusionCurves.Auxillary.LoadSave.DeleteOriginalFolder(pathstring); }
/// <summary> /// Gets called when a project needs to be saved to the disk. /// </summary> /// <param name="givenprojectstate"></param> /// <returns>void</returns> public static void Save(ProjectState givenprojectstate, FramesContainer framescontainer) { string pathstring = ValidateInput.PathString(givenprojectstate.FileName, givenprojectstate.Destination); LoadSave.UnZipFolder(pathstring); File.Delete(pathstring + ".dcip"); WriteData(pathstring, givenprojectstate, framescontainer); LoadSave.ZipFolderRenameToDCIP(pathstring); LoadSave.DeleteOriginalFolder(pathstring); }