Modules - Added activation requirements tab

Profile editor - Only override active profile with profile editor tab open
This commit is contained in:
Robert committed 2020-08-26 19:38:44 +02:00
1 parent 90383f2e41
commit 8d756128e4
12 files changed
+252 -53

No files matched your search

@@ -15,5 +15,10 @@
{
return ActivationMet;
}
public string GetUserFriendlyDescription()
{
return "No description available";
}
}
}
@@ -10,5 +10,11 @@
/// </summary>
/// <returns></returns>
bool Evaluate();
/// <summary>
/// Returns a user-friendly description of the activation requirement, should include parameters if applicable
/// </summary>
/// <returns>A user-friendly description of the activation requirement</returns>
string GetUserFriendlyDescription();
}
}
@@ -43,5 +43,14 @@ namespace Artemis.Core.Plugins.Modules.ActivationRequirements
? processes.Any(p => string.Equals(Path.GetDirectoryName(p.GetProcessFilename()), Location, StringComparison.CurrentCultureIgnoreCase))
: processes.Any();
}
public string GetUserFriendlyDescription()
{
var description = $"Requirement met when \"{ProcessName}.exe\" is running";
if (Location != null)
description += $" from \"{Location}\"";
return description;
}
}
}