示例#1
0
        public VersionContent(VersionContentType type, string content)
        {
            Color color = Colors.Transparent;

            switch (type)
            {
            case VersionContentType.NEW:
                color = ColorItem.GetColorByName("Cyan");
                break;

            case VersionContentType.FIX:
                color = ColorItem.GetColorByName("Green");
                break;

            case VersionContentType.MOD:
                color = ColorItem.GetColorByName("Teal");
                break;

            case VersionContentType.IMP:
                color = ColorItem.GetColorByName("Amber");
                break;

            case VersionContentType.DEL:
                color = ColorItem.GetColorByName("Red");
                break;
            }

            Type       = type;
            Content    = content.Replace("\\n", "\n");
            Background = new SolidColorBrush(color);
        }
示例#2
0
        public VersionContent(VersionContentType type, string content)
        {
            Color color = Colors.Transparent;

            switch (type)
            {
            case VersionContentType.NEW:
                color = ConvertColor(0xFF1BA1E2);    //Cyan
                break;

            case VersionContentType.FIX:
                color = ConvertColor(0xFF60A917);    //Green
                break;

            case VersionContentType.MOD:
                color = ConvertColor(0xFF00ABA9);     // Teal
                break;

            case VersionContentType.IMP:
                color = ConvertColor(0xFFF0A30A);     //Amber
                break;

            case VersionContentType.DEL:
                color = ConvertColor(0xFFE51400);     //Red
                break;
            }

            Type       = type;
            Content    = content.Replace("\\n", "\n");
            Background = new SolidColorBrush(color);
        }