Esempio n. 1
0
 public void DrawUnifiedBox(bool refresh)
 {
     CUI.SetArea(0, 1, Console.WindowWidth, Console.WindowHeight - 2);
     if (refresh)
     {
         CUI.Clear();
         CUI.LineStyle = LineStyle.Normal;
         CUI.DrawAreaBorder();
     }
     else
     {
         CUI.ScaleAreaCentered(-1, -1);
     }
 }
Esempio n. 2
0
        public void DrawRightBox(bool refresh)
        {
            int panelWidth = (Console.WindowWidth / 2);

            CUI.SetArea(panelWidth, 1, panelWidth, Console.WindowHeight - 2);
            if (refresh)
            {
                CUI.Clear();
                CUI.LineStyle = LineStyle.Normal;
                CUI.DrawAreaBorder();
            }
            else
            {
                CUI.ScaleAreaCentered(-1, -1);
            }
        }
Esempio n. 3
0
        public void DisplayOSCMessages()
        {
            CUI.CursorPosition = Position.Zero;
            int index = 0;

            CUI.Clear();

            foreach (var packet in receiver.PacketQueue)
            {
                var message = packet.Address;
                foreach (var arg in packet.Data)
                {
                    message += " " + arg.ToString();
                }
                CUI.DrawString(message);
                CUI.MoveCursorDown();
                index++;
            }
        }
Esempio n. 4
0
        public void Start()
        {
            // Initial GUI setup
            Console.Title = "OSC Debugger";
            CUI.SetAreaFullScreen();
            CUI.Clear();

            var ip = receiver.GetLocalAddress();

            localAddress = ip.ToString();
            if (localAddress == "255.255.255.255")
            {
                localAddress = "Unknown";
            }
//			localSubnet = receiver.GetSubnet (ip).ToString ();

            DrawHeader();

            // Main loop
            run = true;
            while (run)
            {
                refreshPacketList = receiver.NewMessagesAvailable;
                receiver.Update();
                while (Console.KeyAvailable)
                {
                    var key = Console.ReadKey(true);
                    ProcessInput(key);
                }
                Tick();
                Thread.Sleep(100);
            }

            // Cleanup
            Console.WriteLine("Exiting");
        }