public static System.Drawing.Color ToSystemDrawingColor(this ISimpleColor simpleColor) { return(System.Drawing.Color.FromArgb( 255, simpleColor.Color.Red, simpleColor.Color.Green, simpleColor.Color.Blue)); }
public MessageElement(string message, ISimpleColor simpleColor, bool isBold, bool isItallic, bool isUnderlined, bool isObfuscated, bool isStrikeout) { Message = message; ForeColor = simpleColor.Color; IsBold = isBold; IsItallic = isItallic; IsUnderlined = isUnderlined; IsStrikeout = isStrikeout; IsObfuscated = isObfuscated; }
public void SetControlledObject(object item) { try { if (item != null && item is ISimpleColor) { m_Item = (ISimpleColor)item; FillControls(); if (item is IChangeNotify) { ((IChangeNotify)item).ItemChanged += External_ItemChanged; } this.Enabled = true; } else { ClearControls(); this.Enabled = false; } } catch (System.Exception) { } }