Exemplo n.º 1
0
 private static bool IsSameSize(Screen value)
 {
     return Console.BufferWidth == value.Width &&
         Console.BufferHeight == value.Height &&
         Console.WindowWidth == value.Width &&
         Console.WindowHeight == value.Height;
 }
Exemplo n.º 2
0
        void Snapshot()
        {
            if (!process.IsAlive)
            {
                Die("Process terminated");
                return;
            }

            ActorId[] a;
            lock (actors)
                a = actors.ToArray();
            var screen = process.Console.Screen;
            var now = DateTime.Now;
            if (lastScreen == null || !lastScreen.Equals(screen) ||
                now - lastUpdate > TimeSpan.FromSeconds(5))
            {
                lastUpdate = now;
                lastScreen = screen;
                foreach (var actor in a)
                    Node.Send(actor, Id, "ScreenUpdate", screen, process.Console.CursorPosition);
            }
            Loop();
        }
Exemplo n.º 3
0
 void ScreenUpdate(IMail m, Screen screen, CursorPosition position)
 {
     console.Screen = screen;
     console.CursorPosition = position;
     remote = m.As<RpcMail>().From.As<ActorId>();
 }