Form1.cs
changeset 3 db8e6a25d6bc
parent 0 82a61d3d2706
child 5 b2ed6fc37d95
     1.1 --- a/Form1.cs	Tue Nov 04 19:49:34 2014 +0100
     1.2 +++ b/Form1.cs	Tue Nov 04 20:58:19 2014 +0100
     1.3 @@ -123,7 +123,18 @@
     1.4  		private void _remote_ButtonPressed(object sender, RemoteControlEventArgs e)
     1.5  		{
     1.6  			_timer.Enabled = false;
     1.7 -			label1.Text = e.Button.ToString();
     1.8 +            if (e.Button != RemoteControlButton.Unknown)
     1.9 +            {
    1.10 +                label1.Text = e.Button.ToString();
    1.11 +            }
    1.12 +            else if (e.MceButton != MceButton.Null)
    1.13 +            {
    1.14 +                label1.Text = e.MceButton.ToString();
    1.15 +            }
    1.16 +            else
    1.17 +            {
    1.18 +                label1.Text = "Unknown";
    1.19 +            }
    1.20  			label2.Text = e.Device.ToString();			
    1.21  			_timer.Enabled = true;
    1.22  		}