private void InitializeFields() { _repositoryAsync = new ComponentRestServiceRepositoryAsync("http://10.71.34.1:8080/smart-hotel/api/"); _connectionChecker = new ConnectionChecker("http://10.71.34.1:8080/smart-hotel/api/"); _leftLampToggleButton = FindViewById<ToggleButton>(Resource.Id.LeftLampToggle); _rightLampToggleButton = FindViewById<ToggleButton>(Resource.Id.RightLampToggle); _airConditionerToggleButton = FindViewById<ToggleButton>(Resource.Id.AirConditionerToggle); _curtainToggleButton = FindViewById<ToggleButton>(Resource.Id.CurtainToggle); _bathroomToggleButton = FindViewById<ToggleButton>(Resource.Id.BathroomToggle); _connectionStatusText = FindViewById<TextView>(Resource.Id.ConnectionStatusText); }
public ViewController(IntPtr handle) : base(handle) { _repositoryAsync = new ComponentRestServiceRepositoryAsync("http://127.0.0.1:8080/smart-hotel/api/"); _connectionChecker = new ConnectionChecker("http://127.0.0.1:8080/smart-hotel/api/"); }