Example #1
0
        public static void DisableAmbientColor(Control c, Type[] types, eAmbientSettings state)
        {
            var abm = new StyleManagerAmbient();

            if (types.Contains(c.GetType()))
            {
                abm.SetEnableAmbientSettings(c, state);
            }

            foreach (Control cc in c.Controls)
            {
                DisableAmbientColor(cc, types, eAmbientSettings.BackColor);
            }
        }
Example #2
0
 /// <summary>
 /// Sets the ambient settings StyleManager is allowed to change on component.
 /// </summary>
 /// <param name="c">Reference to supported component.</param>
 /// <param name="ambientSettings">Ambient settings that StyleManager may change.</param>
 public void SetEnableAmbientSettings(Control c, eAmbientSettings ambientSettings)
 {
     if (_Settings.ContainsKey(c))
     {
         if (ambientSettings == eAmbientSettings.All)
             _Settings.Remove(c);
         else
             _Settings[c] = ambientSettings;
     }
     else if (ambientSettings != eAmbientSettings.All)
     {
         _Settings.Add(c, ambientSettings);
     }
 }