Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.WPF/App.axaml.cs')
-rw-r--r--UVtools.WPF/App.axaml.cs23
1 files changed, 17 insertions, 6 deletions
diff --git a/UVtools.WPF/App.axaml.cs b/UVtools.WPF/App.axaml.cs
index 54e4889..5ab32f6 100644
--- a/UVtools.WPF/App.axaml.cs
+++ b/UVtools.WPF/App.axaml.cs
@@ -150,24 +150,35 @@ namespace UVtools.WPF
public static string ApplicationPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
- public static string GetPrusaSlicerDirectory()
+ public static string GetPrusaSlicerDirectory(bool isSuperSlicer = false)
{
+ var slicerFolder = isSuperSlicer ? "SuperSlicer" : "PrusaSlicer";
if (OperatingSystem.IsWindows())
{
- return $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}{Path.DirectorySeparatorChar}PrusaSlicer";
+ return Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
+ slicerFolder);
}
if (OperatingSystem.IsLinux())
{
- var folder1 = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}{Path.DirectorySeparatorChar}.config{Path.DirectorySeparatorChar}PrusaSlicer";
+ var folder1 = Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
+ ".config",
+ slicerFolder);
if (Directory.Exists(folder1)) return folder1;
- return $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}{Path.DirectorySeparatorChar}.PrusaSlicer";
+ return Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
+ $".{slicerFolder}");
}
if (OperatingSystem.IsMacOS())
{
- return string.Format("{0}{1}Library{1}Application Support{1}PrusaSlicer",
- Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), Path.DirectorySeparatorChar);
+ return Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
+ "Library",
+ "Application Support",
+ slicerFolder);
}
return null;