private void LoadSupportedVisualRecognitionThemes()
{
supportedVisualRecognitionThemes = new ArrayList();
try
{
String[] files = System.IO.Directory.GetFiles(Application.StartupPath + @"\\Resources\\ColorMaps\\" + this.Name);
Regex themeName = new Regex(@"[\w]+_[\d]+-max_(?<theme>[\w]+)\.bmp");
foreach (String file in files)
{
Match m = themeName.Match(file);
if (m.Success){
String theme = m.Groups["theme"].Value;
Trace.WriteLine("Found valid color map for " + this.Name + ": " + theme);
if (!supportedVisualRecognitionThemes.Contains(theme))
{
supportedVisualRecognitionThemes.Add(theme);
}
}else{
Trace.WriteLine("Detected invalid card map filename format: " + file + ", skipping...");
}
}
}
catch (DirectoryNotFoundException)
{
Trace.WriteLine("CardMaps directory for " + this.Name + " not found, skipping...");
}
}