private void InitControlAction() { var btnShutDown = FindViewById <ImageView>(Resource.Id.btnShutDown); btnShutDown.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(Model.RPCModelFactory.GetRequestModel(Model.System.ShutDown)); }; var btnUp = FindViewById <Button>(Resource.Id.btnUp); btnUp.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Up)); }; var btnDown = FindViewById <Button>(Resource.Id.btnDown); btnDown.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Down)); }; var btnLeft = FindViewById <Button>(Resource.Id.btnLeft); btnLeft.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Left)); }; var btnRight = FindViewById <Button>(Resource.Id.btnRight); btnRight.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Right)); }; var btnOk = FindViewById <Button>(Resource.Id.btnOk); btnOk.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Select)); }; var btnBack = FindViewById <Button>(Resource.Id.btnBack); btnBack.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Back)); }; var btnHome = FindViewById <ImageButton>(Resource.Id.btnHome); btnHome.Click += async(sender, args) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Input.Home)); }; var volUp = FindViewById <Button>(Resource.Id.btnVolUp); volUp.Click += async(s, e) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Model.Application.SetVolume, VolumeMethod.Up)); }; var volDown = FindViewById <Button>(Resource.Id.btnVolDown); volDown.Click += async(s, e) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Model.Application.SetVolume, VolumeMethod.Down)); }; var volMute = FindViewById <ImageButton>(Resource.Id.btnVolZero); volMute.Click += async(s, e) => { await _jsonClient.SendRequstAsync(RPCModelFactory.GetRequestModel(Model.Application.SetMute, VolumeMethod.Down)); }; }