Exemplo n.º 1
0
        private void MoveButtonClick(object Sender, EventArgs Events)
        {
            Button button = (Button)Sender;

            switch (button.Id)
            {
            case Resource.Id.MoveUpButton:
                bluetoothConnection.PushData(1);
                Console.WriteLine("MoveUp");
                break;

            case Resource.Id.MoveDownButton:
                bluetoothConnection.PushData(2);
                Console.WriteLine("MoveDown");
                break;

            case Resource.Id.MoveLeftButton:
                bluetoothConnection.PushData(3);
                Console.WriteLine("MoveLeft");
                break;

            case Resource.Id.MoveRightButton:
                bluetoothConnection.PushData(4);
                Console.WriteLine("MoveRight");
                break;
            }
        }
Exemplo n.º 2
0
        partial void MoveButtonPressed(UIButton sender)
        {
            switch (sender.Tag)
            {
            case 1:
                bluetoothConnection.PushData(1);
                break;

            case 2:
                bluetoothConnection.PushData(2);
                break;

            case 3:
                bluetoothConnection.PushData(3);
                break;

            case 4:
                bluetoothConnection.PushData(4);
                break;
            }
        }