mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
[WIP] Created SteamLibrary class to handle library
Pulled out the the library list mgmt from SteamGame and put it in a new SteamLibrary class. This means I can replicate the learnings from the ShortcutRepo amd Profile Repo, and can save separate JSON files in the future if I so desire. There is a little bit outstanding to make the SteamGame Properties to be writeable as well as readable, otherwise the SteamGame.CopyTo function won't work.
This commit is contained in:
@ -24,6 +24,7 @@ namespace HeliosPlus
|
||||
// Other constants that are useful
|
||||
private static string _shortcutStorageJsonPath = Path.Combine(Program.AppDataPath, $"Shortcuts");
|
||||
private static string _shortcutStorageJsonFileName = Path.Combine(_shortcutStorageJsonPath, $"Shortcuts_{Version.ToString(2)}.json");
|
||||
private static string uuidV4Regex = @"(?im)^[{(]?[0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$";
|
||||
#endregion
|
||||
|
||||
#region Class Constructors
|
||||
@ -147,7 +148,7 @@ namespace HeliosPlus
|
||||
List<ShortcutItem> shortcutsToRemove;
|
||||
int numRemoved;
|
||||
|
||||
string uuidV4Regex = @"/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i";
|
||||
//string uuidV4Regex = @"/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i";
|
||||
Match match = Regex.Match(shortcutNameOrUuid, uuidV4Regex, RegexOptions.IgnoreCase);
|
||||
if (match.Success)
|
||||
{
|
||||
@ -207,7 +208,7 @@ namespace HeliosPlus
|
||||
return false;
|
||||
|
||||
|
||||
string uuidV4Regex = @"/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i";
|
||||
//string uuidV4Regex = @"(?im)^[{(]?[0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$";
|
||||
Match match = Regex.Match(shortcutNameOrUuid, uuidV4Regex, RegexOptions.IgnoreCase);
|
||||
if (match.Success)
|
||||
{
|
||||
@ -238,7 +239,7 @@ namespace HeliosPlus
|
||||
if (String.IsNullOrWhiteSpace(shortcutNameOrUuid))
|
||||
return null;
|
||||
|
||||
string uuidV4Regex = @"/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i";
|
||||
//string uuidV4Regex = @"/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i";
|
||||
Match match = Regex.Match(shortcutNameOrUuid, uuidV4Regex, RegexOptions.IgnoreCase);
|
||||
if (match.Success)
|
||||
{
|
||||
|
Reference in New Issue
Block a user