private void AttachHandlers() { FindViewById <Button>(Resource.Id.MoveUp).Click += delegate { _remote.MoveUp(); }; FindViewById <Button>(Resource.Id.MoveDown).Click += delegate { _remote.MoveDown(); }; FindViewById <Button>(Resource.Id.MoveLeft).Click += delegate { _remote.MoveLeft(); }; FindViewById <Button>(Resource.Id.MoveRight).Click += delegate { _remote.MoveRight(); }; FindViewById <Button>(Resource.Id.ZoomIn).Click += delegate { _remote.ZoomIn(); }; FindViewById <Button>(Resource.Id.ZoomOut).Click += delegate { _remote.ZoomOut(); }; }
private void AttachHandlers() { MoveUp.TouchUpInside += delegate { _remote.MoveUp(); }; MoveDown.TouchUpInside += delegate { _remote.MoveDown(); }; MoveRight.TouchUpInside += delegate { _remote.MoveRight(); }; MoveLeft.TouchUpInside += delegate { _remote.MoveLeft(); }; ZoomLevel.MinimumValue = double.MinValue; ZoomLevel.MaximumValue = double.MaxValue; ZoomLevel.Value = _currentZoomLevel; ZoomLevel.ValueChanged += delegate { if (ZoomLevel.Value > _currentZoomLevel) { _remote.ZoomIn(); } else { _remote.ZoomOut(); } _currentZoomLevel = ZoomLevel.Value; }; }
void HandleMoveUpTouched(object sender, EventArgs e) { _remote.MoveUp(); }