public void TestHighlightedCell()
        {
            var font  = SAEResources.GetAllFonts().First();
            var image = new CodedImage {
                Size = new Size(5, 5)
            };
            var symboler = new ImageSymbolsController(new ImageSymbolsManipulator(image), new[] { font }, font);

            using (symboler.SuspendCallManipulations())
            {
                symboler.IncludeLetters = true;
                symboler.IncludeNumbers = false;
                symboler.IncludeSymbols = false;
            }
            var visualSymbolsController = new VisualSymbolsController(symboler, new Size(100, 150));

            visualSymbolsController.OnShift(new Point(50, 20));
            Assert.AreEqual(new Point(1, 0), visualSymbolsController.HighlightedCell);

            visualSymbolsController.OnShift(new Point(50, 100));
            Assert.AreEqual(new Point(1, 3), visualSymbolsController.HighlightedCell);
        }
        public void TestShift()
        {
            var font  = SAEResources.GetAllFonts().First();
            var image = new CodedImage {
                Size = new Size(5, 5)
            };
            var symboler = new ImageSymbolsController(new ImageSymbolsManipulator(image), new[] { font }, font);

            using (symboler.SuspendCallManipulations())
            {
                symboler.IncludeLetters = true;
                symboler.IncludeNumbers = false;
                symboler.IncludeSymbols = false;
            }
            var visualSymbolsController = new VisualSymbolsController(symboler, new Size(100, 150));

            Assert.AreEqual(0, visualSymbolsController.VerticalShift);

            using (visualSymbolsController.SuspendUpdateVisualImage())
            {
                visualSymbolsController.OnTouched(new Point(50, 50));

                visualSymbolsController.OnShift(new Point(50, 60));
                Assert.AreEqual(0, visualSymbolsController.VerticalShift, "Should not shift beyond top row.");

                visualSymbolsController.OnShift(new Point(50, 40));
                Assert.AreEqual(20, visualSymbolsController.VerticalShift);

                visualSymbolsController.OnShift(new Point(50, 45));
                Assert.AreEqual(15, visualSymbolsController.VerticalShift);

                visualSymbolsController.OnShift(new Point(50, -2000));
                Assert.AreEqual(1098, visualSymbolsController.VerticalShift, "Should not shift beyond bottom row.");

                visualSymbolsController.OnUntouched(new Point(0, 0));
            }
        }