示例#1
0
        public static object SkinSetTheme(params object[] args)
        {
            // args[0] - new skin theme name
            // args[1] - (optional) the control id to focus on after the theme has been changed
            int focusControlId = 0;

            if (args.Length > 1)
            {
                focusControlId = (int)args[1];
            }

            return(GUIThemeManager.ActivateThemeByName(args[0].ToString(), focusControlId));
        }
示例#2
0
 private static void LoadDiscreteSettings()
 {
     using (Settings xmlReader = new SKSettings())
     {
         if (!_noTheme)
         {
             // Initialize the theme manager for the selected theme.
             GUIThemeManager.Init(xmlReader.GetValueAsString(THEME_SECTION_NAME, THEME_NAME_ENTRY, GUIThemeManager.THEME_SKIN_DEFAULT));
         }
         else
         {
             // Initialize the theme manager for the watchdog.
             GUIThemeManager.Init(GUIThemeManager.THEME_SKIN_DEFAULT);
         }
     }
 }
示例#3
0
        public static object SkinTheme(params object[] args)
        {
            // args[0] - theme navigation direction; 1 moves to next, -1 moves to previous
            // args[1] - (optional) the control id to focus on after the theme has been changed
            int direction      = 1;
            int focusControlId = 0;

            if (args.Length > 0)
            {
                direction = (int)args[0];

                if (args.Length > 1)
                {
                    focusControlId = (int)args[1];
                }
            }

            return(GUIThemeManager.ActivateThemeNext(direction, focusControlId));
        }
示例#4
0
 private static void ClearDiscreteSettings()
 {
     GUIThemeManager.ClearSettings();
 }