static private GetRemovablesFromProcess ( string process, List |
||
process | string | |
rules | List |
|
Résultat | List |
private static string CleanWindowTitle(string process, string websiteTitle) { var removables = BaseRules.GetRemovablesFromProcess(process, BaseRules.WebsiteRules); // remove programname from title if (removables != null && removables.Count > 0) { foreach (var r in removables) { websiteTitle = Regex.Replace(websiteTitle, r, "").Trim(); } } return(websiteTitle.Trim()); }
public static string CleanWindowTitle(string process, string title) { // run basis cleaning title = BaseRules.RunBasisArtifactTitleCleaning(title); var removables = BaseRules.GetRemovablesFromProcess(process, BaseRules.ArtifactRules); // remove programname from title if (removables != null && removables.Count > 0) { foreach (var r in removables) { title = Regex.Replace(title, r, "").Trim(); } } // remove path if (title.Contains("/") || title.Contains("\\")) { title = GetFileNameFromPath(title); } return(title.Trim()); }