Ejemplo n.º 1
0
Archivo: Form1.cs Proyecto: solson/DSAE
 private void showArms_StreamedTupleReceived(RemoteTuple<bool> tuple, int clientId)
 {
     showTheirArm = tuple.X;
 }
Ejemplo n.º 2
0
Archivo: Form1.cs Proyecto: solson/DSAE
        private void origins_StreamedTupleReceived(RemoteTuple<int, int> tuple, int clientId)
        {
            Point windowLocation = new Point(tuple.X, tuple.Y);

            if (playerID == 0)
                user2Origin = windowLocation;
            else if (playerID == 1)
                user1Origin = windowLocation;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Update telepointers for some client (may be my own!)
 /// </summary>
 /// <param name="tuple"></param>
 /// <param name="clientId"></param>
 private void coords_StreamedTupleReceived(RemoteTuple<int, int> tuple, int clientId)
 {
     if (!telepointers.ContainsKey(clientId))
     {
         // Ensure we're different
         Color tpc = clientId == coords.Identity ? Color.Red : Color.Blue;
         telepointers.Add(clientId, new Telepointer(tpc));
     }
     telepointers[clientId].Update(tuple.X, tuple.Y);
 }
Ejemplo n.º 4
0
Archivo: Form1.cs Proyecto: solson/DSAE
 private void coords_StreamedTupleReceived(RemoteTuple<int, int> tuple, int clientId)
 {
     updateRemoteMousePosition(tuple.X, tuple.Y);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Update telepointers for some client (may be my own!)
        /// </summary>
        /// <param name="tuple"></param>
        /// <param name="clientId"></param>
        private void coords_StreamedTupleReceived(RemoteTuple<int, int > tuple, int clientId)
        {
            if (!telepointers.ContainsKey(clientId))
            {
                // Ensure we're different
                Color tpc = clientId == coords.Identity ? Color.Red : Color.Blue;
                telepointers.Add(clientId, new Telepointer(tpc));
            }

            // int y = (int)tuple.Y[0];

            telepointers[clientId].Update(tuple.X, tuple.Y);

            if (!telepointers[clientId].getColor().Equals(Color.Red))
            {

             //  ContaRecebidas++;
             //  this.label2.Text = "Recebidas:" + ContaRecebidas.ToString() + " de:" + clientId.ToString();

                // this.label2.Text = "Recebido:" + DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond.ToString();
            }
        }