Ejemplo n.º 1
0
        public void Create(string displayId, int width, int height)
        {
            var display = new Display
            {
                Id           = displayId,
                Width        = width,
                Height       = height,
                TextRenderer = new TextRenderer(width, height)
            };

            DisplayHandler.Register(display);
            LiveConnections.Add(displayId);

            Response.Buffer = false;
            while (LiveConnections.Contains(displayId))
            {
                if (display.Queue.Any())
                {
                    string text = display.Queue.Dequeue();
                    Response.Output.Write(text);
                    Response.Output.Flush();
                }
                Thread.Sleep(900);
            }
            Response.End();
        }