Esempio n. 1
0
 private XLColor(XLThemeColor themeColor, Double themeTint)
 {
     _themeColor = themeColor;
     _themeTint  = themeTint;
     _hashCode   = 7 ^ _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
     HasValue    = true;
     _colorType  = XLColorType.Theme;
 }
 internal XLColor(XLThemeColor themeColor)
 {
     _themeColor = themeColor;
     _themeTint  = 1;
     _hashCode   = 7 ^ _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
     HasValue    = true;
     _colorType  = XLColorType.Theme;
 }
 internal XLColor(XLThemeColor themeColor, Double themeTint)
 {
     _themeColor = themeColor;
     _themeTint = themeTint;
     _hashCode = 7 ^ _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
     HasValue = true;
     _colorType = XLColorType.Theme;
 }
Esempio n. 4
0
 private XLColor(XLThemeColor themeColor)
 {
     _themeColor = themeColor;
     _themeTint = 0;
     _hashCode = 7 ^ _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
     HasValue = true;
     _colorType = XLColorType.Theme;
 }
Esempio n. 5
0
        public override int GetHashCode()
        {
            if (_hashCode == 0)
            {
                if (_colorType == XLColorType.Color)
                {
                    _hashCode = _color.GetHashCode();
                }
                else if (_colorType == XLColorType.Theme)
                {
                    _hashCode = _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
                }
                else
                {
                    _hashCode = _indexed;
                }
            }

            return(_hashCode);
        }