public async void OnServiceBound(ConnectionService service) { this.Connection = service; string Existing = this.Preferences.GetString("ip", null); if (Existing == null) { this.Discoverer.StartDiscovery(); return; } try { await this.Connection.Connect(Existing); this.StartActivity(new Intent(this, typeof(MainActivity))); } catch { Toast.MakeText(this, "Failed to connect", ToastLength.Long).Show(); this.Discoverer.StartDiscovery(); } }
public void OnServiceUnbound() { this.RemoveEvents(); this.Connection = null; }
public void OnServiceBound(ConnectionService service) { this.Connection = service; this.AttachEvents(); }
public void OnServiceUnbound() { this.Connection = null; }
public ConnectionBinder(ConnectionService service) => this.Service = service;
public void OnServiceBound(ConnectionService service) { this.Connection = service; this.Connection.Client.OnNetworkListTitleInfo += this.OnNetworkListTitleInfo; }
public void OnServiceUnbound() { this.Connection.Client.OnNetworkListTitleInfo -= this.OnNetworkListTitleInfo; this.Connection = null; }