Move PrintHistoryPath to ApplicationDataStorage pattern

This commit is contained in:
John Lewin 2019-05-23 08:39:27 -07:00
parent a3700ba8cb
commit aeb5f0de24
2 changed files with 5 additions and 5 deletions

View file

@ -2566,12 +2566,8 @@ namespace MatterHackers.MatterControl
// Create archive point for printing attempt
if (Path.GetExtension(sourcePath).ToUpper() == ".MCX")
{
// TODO: We should zip mcx and settings when starting a print
string platingDirectory = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, "PrintHistory");
Directory.CreateDirectory(platingDirectory);
string now = "Workspace " + DateTime.Now.ToString("yyyy-MM-dd HH_mm_ss");
string archivePath = Path.Combine(platingDirectory, now + ".zip");
string archivePath = Path.Combine(ApplicationDataStorage.Instance.PrintHistoryPath, now + ".zip");
string settingsFilePath = ProfileManager.Instance.ProfilePath(printer.Settings.ID);

View file

@ -88,6 +88,8 @@ namespace MatterHackers.MatterControl.DataStorage
private static string _cacheDirectory => Path.Combine(_applicationTempDataPath, "cache");
private static string _printHistoryPath => Path.Combine(_applicationLibraryDataPath, "PrintHistory");
private static string _webCacheDirectory => Path.Combine(_applicationTempDataPath, "WebCache");
public static string ApplicationUserDataPath => EnsurePath(_applicationUserDataPath);
@ -104,6 +106,8 @@ namespace MatterHackers.MatterControl.DataStorage
public string CacheDirectory => EnsurePath(_cacheDirectory);
public string PrintHistoryPath => EnsurePath(_printHistoryPath);
public string WebCacheDirectory => EnsurePath(_webCacheDirectory);
public string DownloadsDirectory { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");