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