Beispiel #1
0
        private static void WriteChunkInColorStyled(string trailer, char[] buffer, int index, int count, StyleSheet styleSheet)
        {
            string chunk = buffer.AsString().Substring(index, count);

            Console.WriteInColorStyled(trailer, chunk, styleSheet);
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }