示例#1
0
        static Theme()
        {
            if (!Platform.HasRenderAPI)
            {
                theme = new NullTheme();
                return;
            }

            PlatformTheme = Platform.PlatformTheme;
            theme         = PlatformTheme ?? DefaultTheme.Create();
            theme.Start();

            Menu.Menu.UpdateDecalSizes();
            Clock.UpdateSize();
        }
示例#2
0
        private static ITheme GetThemeByIndex(int i)
        {
            switch (i)
            {
            case 0: return(PlatformTheme ?? throw new InvalidOperationException());

            case 1: return(DefaultTheme.Create());

            case 2: return(AlternateBordersTheme.Create());

            case 3: return(SimpleTheme.CreateBlack());

            case 4: return(SimpleTheme.CreateWhite());

            case 5: return(SimpleTheme.CreateBlue());

            case 6: return(StylishTheme.CreateRed());

            case 7: return(StylishTheme.CreateBlue());

            default: throw new IndexOutOfRangeException();
            }
        }