Ejemplo n.º 1
0
 /// <inheritdoc />
 public virtual void RemoveEffect(FontEffects effect)
 {
     foreach (var flag in effect.GetFlags())
     {
         // Lookup enable command and send if non-empty
         if (DisableCommands.ContainsKey(flag))
         {
             var cmd = DisableCommands[flag];
             if (cmd.Length > 0)
             {
                 internalSend(cmd);
             }
         }
     }
     Effects &= ~effect;
 }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public virtual void AddEffect(FontEffects effect)
        {
            foreach (var flag in effect.GetFlags())
            {
                // Lookup enable command and send if non-empty
                if (!EnableCommands.ContainsKey(flag))
                {
                    continue;
                }
                var cmd = EnableCommands[flag];
                if (cmd.Length > 0)
                {
                    internalSend(cmd);
                }
            }

            Effects |= effect;
        }