public ColorConverterSmartTagAction(ITrackingSpan span, ColorModel colorModel, ColorFormat format)
        {
            _span = span;

            if (format == ColorFormat.RgbHex6)
                format = ColorFormat.RgbHex3;

            _format = format;
            _colorModel = colorModel.Clone();
            _colorModel.Format = format;

            if (Icon == null)
            {
                Icon = BitmapFrame.Create(new Uri("pack://application:,,,/WebEssentials2015;component/Resources/Images/palette.png", UriKind.RelativeOrAbsolute));
            }

            _displayText = "Convert to " + GetColorString(_format, _colorModel);
        }
示例#2
0
        public ColorConverterSmartTagAction(ITrackingSpan span, ColorModel colorModel, ColorFormat format)
        {
            _span = span;

            if (format == ColorFormat.RgbHex6)
            {
                format = ColorFormat.RgbHex3;
            }

            _format            = format;
            _colorModel        = colorModel.Clone();
            _colorModel.Format = format;

            if (Icon == null)
            {
                Icon = BitmapFrame.Create(new Uri("pack://application:,,,/WebEssentials2013;component/Resources/Images/palette.png", UriKind.RelativeOrAbsolute));
            }

            _displayText = "Convert to " + GetColorString(_format, _colorModel);
        }