16 using System.Windows.Forms;
19 namespace sage.ew.formul.ButtonTittle.Themes
21 internal class ThemeFactory
23 private readonly Form form;
25 public ThemeFactory(Form form)
30 public ITheme GetTheme()
32 if (Win32.osversion.Major == 10)
35 return new Aero10(form);
37 else if (Win32.osversion.Major > 6 || (Win32.osversion.Major == 6 && Win32.osversion.Minor > 1))
40 return new Aero8(form);
42 else if (Win32.DwmIsCompositionEnabled)
45 return new Aero(form);
47 else if (Application.RenderWithVisualStyles && Win32.version > 6)
50 return new Styled(form);
52 else if (Application.RenderWithVisualStyles)
55 return new XPStyle(form);
59 return new Standard(form);