Example #1
0
        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();
            }
        }
Example #2
0
 public void OnServiceUnbound()
 {
     this.RemoveEvents();
     this.Connection = null;
 }
Example #3
0
 public void OnServiceBound(ConnectionService service)
 {
     this.Connection = service;
     this.AttachEvents();
 }
Example #4
0
 public void OnServiceUnbound()
 {
     this.Connection = null;
 }
Example #5
0
 public ConnectionBinder(ConnectionService service) => this.Service = service;
Example #6
0
 public void OnServiceBound(ConnectionService service)
 {
     this.Connection = service;
     this.Connection.Client.OnNetworkListTitleInfo += this.OnNetworkListTitleInfo;
 }
Example #7
0
 public void OnServiceUnbound()
 {
     this.Connection.Client.OnNetworkListTitleInfo -= this.OnNetworkListTitleInfo;
     this.Connection = null;
 }