示例#1
0
        private static void WriteInColorStyled <T, U>(string trailer, T target0, U target1, U target2, U target3, StyleSheet styleSheet)
        {
            TextAnnotator annotator = new TextAnnotator(styleSheet);

            string formatted = string.Format(target0.ToString(), target1, target2, target3);
            List <KeyValuePair <string, Color> > annotationMap = annotator.GetAnnotationMap(formatted);

            Console.MapToScreen(annotationMap, trailer);
        }
示例#2
0
        private static void WriteAsciiInColorStyled(string trailer, StyledString target, StyleSheet styleSheet)
        {
            TextAnnotator annotator = new TextAnnotator(styleSheet);
            List <KeyValuePair <string, Color> > annotationMap = annotator.GetAnnotationMap(target.AbstractValue); // Should eventually be target.AsStyledString() everywhere...?

            Console.PopulateColorGeometry(annotationMap, target);

            Console.MapToScreen(target, trailer);
        }