Ejemplo n.º 1
0
 protected void OnDiscoveryAddressAdded(DiscoveryAddressAddedEventArgs e)
 {
     if (DiscoveryAddressAdded != null)
         DiscoveryAddressAdded(this, e);
 }
Ejemplo n.º 2
0
 private void OnDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     if (_client != null) return;
     var builder = new AlertDialog.Builder(this);
     builder.SetPositiveButton("Yes", (sender, args) =>
     {
         SetStatus("Connecting to " + e.ServiceInfo.Name + "...");
         StartClient(e.ServiceInfo.Address);
     });
     builder.SetNegativeButton("No", (sender, args) => { });
     builder.SetMessage("Found service on " + e.ServiceInfo.Name + ". Do you want to connect?");
     builder.SetTitle("Connect to service");
     RunOnUiThread(() => builder.Show());
 }
Ejemplo n.º 3
0
 private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     AddDiscoveryActivityManagerToUi(e.ServiceInfo);
 }
Ejemplo n.º 4
0
        private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
        {
            var q = new List<TagVisualization>(Visualizer.ActiveVisualizations);

            this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
            {
                foreach (var tv in q)
                {
                    if (e.ServiceInfo.Code == Convert.ToString(tv.VisualizedTag.Value))
                    {
                        StartClient(e.ServiceInfo.Address, e.ServiceInfo.Code);
                    }
                    return;
                }
            }));
        }
Ejemplo n.º 5
0
 private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     if(e.ServiceInfo.Code != "139")
         StartClient(e.ServiceInfo.Address);
 }