private static ThemeElementsDefault LoadTheme (string themeName)
{
if (themeName == "visualstyles")
if (Application.VisualStylesEnabled)
return new ThemeElementsVisualStyles ();
else
return new ThemeElementsDefault ();
Assembly ass = Assembly.GetExecutingAssembly ();
string iname = typeof(ThemeElements).FullName;
string assemblyname = iname + themeName;
Type type = ass.GetType (assemblyname, false, true);
if (type != null) {
object o = ass.CreateInstance (type.FullName);
if (o != null)
return (ThemeElementsDefault) o;
}
return new ThemeElementsDefault ();
}