public void DeleteSnapShot(SnapShotDetails snapShot) { try { AppDataContext.SnapShots.Remove(snapShot); //var directoryPath = FileNameConstants.SNAPSHOTS_DIRECTORY_PATH(); //Directory.CreateDirectory(directoryPath); //var filePath = FileNameConstants.SNAPSHOT_DIRECTORY_FILE_PATH(snapShot); //BinarySerializer.SaveFile(snapShot.Image, filePath); } catch (Exception e) { } }
public static string SNAPSHOT_DIRECTORY_FILE_PATH(SnapShotDetails item) { return(string.Format(@"{0}\{1}@{2}.{3}", SNAPSHOTS_DIRECTORY_PATH(), item.Percentage.ToString(), item.DateTime.ToFileNameFormat(), SNAPSHOT_FILE_EXTENSION)); }