More UI updates

This commit is contained in:
2023-04-16 12:57:17 -04:00
parent 5c0c84a068
commit d6a2fd5a46
47 changed files with 3695 additions and 3768 deletions

View File

@@ -3,33 +3,32 @@ using System;
using System.IO;
using System.Reflection;
namespace FeedCenter
namespace FeedCenter;
public static class SystemConfiguration
{
public static class SystemConfiguration
private static bool UseDebugPath => Environment.CommandLine.IndexOf("/debugPath", StringComparison.InvariantCultureIgnoreCase) != -1;
public static string DataDirectory => UseDebugPath ? Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) : UserSettingsPath;
public static string UserSettingsPath
{
private static bool UseDebugPath => Environment.CommandLine.IndexOf("/debugPath", StringComparison.InvariantCultureIgnoreCase) != -1;
public static string DataDirectory => UseDebugPath ? Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) : UserSettingsPath;
public static string UserSettingsPath
get
{
get
{
// If we're running in debug mode then use a local path for the database and logs
if (UseDebugPath)
return Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
// If we're running in debug mode then use a local path for the database and logs
if (UseDebugPath)
return Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
// Get the path to the local application data directory
var path = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
Resources.ApplicationName);
// Get the path to the local application data directory
var path = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
Resources.ApplicationName);
// Make sure it exists - create it if needed
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
// Make sure it exists - create it if needed
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
return path;
}
return path;
}
}
}
}