public void PaintPencilMarksAndHints() { foreach (KeyValuePair <Point, Dictionary <int, Hint.Kind> > kvp in pencil) { Point p = kvp.Key; Dictionary <int, Hint.Kind> d = kvp.Value; int[] ln = d.Keys.ToArray(); Array.Sort(ln); for (int i = 0; i < ln.Length; ++i) { Brush br = ForegroundBrush(d[ln[i]]); DrawSubcell(br, p.X, p.Y, i + Cells - ln.Length, grid.ToChar(ln[i]).ToString()); } } }