Exemple #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="knownColor">Enumeration element of type KnownExtendedColors</param>
 internal ExtendedColors(KnownExtendedColors knownColor)
 {
     m_Value           = 0;
     m_State           = StateKnownColorValid;
     m_Name            = null;
     this.m_KnownColor = unchecked ((short)knownColor);
 }
Exemple #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="value">32-bit ARGB value</param>
 /// <param name="state">ExtendedColors state value.</param>
 /// <param name="name">ExtendedColors name value</param>
 /// <param name="knownColor">Enumeration element of type KnownExtendedColors</param>
 private ExtendedColors(long value, short state, string name, KnownExtendedColors knownColor)
 {
     this.m_Value      = value;
     this.m_State      = state;
     this.m_Name       = name;
     this.m_KnownColor = unchecked ((short)knownColor);
 }
Exemple #3
0
 /// <summary>
 /// Creates a ExtendedColors structure from the
 /// </summary>
 /// <param name="color">Enumeration of type KnownExtendedColors</param>
 /// <returns>The ExtendedColors structure that this method creates based on given enumeration otherwise an empty ExtendedColors.</returns>
 public static ExtendedColors FromKnownColor(KnownExtendedColors color)
 {
     if (IsEnumValid(unchecked ((int)color), (int)KnownExtendedColors.AbaloneShell, (int)KnownExtendedColors.ZurichWhite)) // end side
     {
         return(ExtendedColors.FromName(color.ToString()));
     }
     return(new ExtendedColors(color));
 }