public static void Initialize()
        {
            // Set up the graphics system
            graphics = new GraphicsContext();

            Draw.init(graphics);
            dgl_connection = new dialog.DLG_CONNECTION();

            UISystem.Initialize(graphics);

            sceneMain = new MainUI();
            UISystem.SetScene(sceneMain, null);

            stopWatch = new Stopwatch();
            texture1  = new Texture2D(940, 544, false, PixelFormat.Rgba);
            texture2  = new Texture2D(940, 544, false, PixelFormat.Rgba);

            // Set up Client
            client = new TCPConnection("192.168.1.110", 8080);
            SendPacket.Init(client);
        }
示例#2
0
        /*
         * public static void sendLeftMouseClick(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 101;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         * }
         *
         * public static void sendLeftMouseDoubleClick(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 102;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         * }
         *
         * public static void sendDrag(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 103;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         * }
         *
         * public static void sendMouseMove(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 104;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         * }
         *
         * public static void sendRightMouseClick(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 105;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         *
         * }
         *
         * public static void sendRightMouseDoubleClick(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 106;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         *
         * }
         *
         * public static void sendLeftMouseDown(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 107;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         *
         * }
         *
         * public static void sendLeftMouseUp(int x, int y)
         * {
         *      Packet msg = new Packet();
         *      msg.ID = 108;
         *      msg.Data = coordsToByte(x,y);
         *      socket.send(msg);
         *
         * }
         */
        #endregion

        public static void Init(TCPConnection tcpSocket)
        {
            socket = tcpSocket;
        }
示例#3
0
//		public static void ReceiveCallback(IAsyncResult AsyncResult)
//		{
//			TCPConnection TCPs = (TCPConnection)AsyncResult.AsyncState;
//			TCPs.OnReceive(AsyncResult);
//		}
        public static void SendCallback(IAsyncResult AsyncResult)
        {
            TCPConnection TCPs = (TCPConnection)AsyncResult.AsyncState;

            TCPs.OnSend(AsyncResult);
        }
示例#4
0
        public static void ConnectCallback(IAsyncResult AsyncResult)
        {
            TCPConnection Client = (TCPConnection)AsyncResult.AsyncState;

            Client.OnConnect(AsyncResult);
        }