Beispiel #1
0
 public void DrawHeader()
 {
     // Draw Header
     CUI.SetArea(1, 0, Console.WindowWidth, 1);
     CUI.DrawString("IP: " + localAddress + "   Port: " + receiver.Port);
     //			CUI.DrawString (16, 0, "Subnet: " + localSubnet);
 }
Beispiel #2
0
 public void DisplayPacketInfo(OscPacket packet)
 {
     CUI.DrawString("Source:    " + packet.SourceEndPoint.ToString());
     CUI.MoveCursorDown(2);
     CUI.DrawString("IsBundle:    " + packet.IsBundle.ToString());
     CUI.MoveCursorDown(2);
     CUI.DrawString("Arguments:");
     CUI.MoveCursorDown(2);
     CUI.MoveCursorRight();
     CUI.MoveCursorRight();
     if (packet.Data.Count == 0)
     {
         CUI.DrawString("none");
     }
     else
     {
         foreach (var arg in packet.Data)
         {
             if (arg is string)
             {
                 CUI.DrawString("(string) " + (string)arg);
             }
             else if (arg is Int32)
             {
                 CUI.DrawString("(int32)  " + (Int32)arg);
             }
             else if (arg is Int64)
             {
                 CUI.DrawString("(int64)  " + (Int64)arg);
             }
             else if (arg is float)
             {
                 CUI.DrawString("(float)  " + (float)arg);
             }
             else if (arg is double)
             {
                 CUI.DrawString("(double) " + (double)arg);
             }
             else if (arg is byte[])
             {
                 CUI.DrawString("(byte[]) " + ((byte[])arg).Length + " bytes");
             }
             else if (arg is char)
             {
                 CUI.DrawString("(char)   " + (char)arg);
             }
             else if (arg is bool)
             {
                 CUI.DrawString("(bool)   " + (bool)arg);
             }
             else
             {
                 CUI.DrawString("(????)   " + "unknown");
             }
             CUI.MoveCursorDown();
         }
     }
 }
Beispiel #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++;
            }
        }
Beispiel #4
0
 public void DrawStatusLine()
 {
     CUI.SetArea(1, Console.WindowHeight - 1, Console.WindowWidth, 1);
     CUI.DrawString(isPaused ? "Paused     " : "Running     ");
 }