protected void OnDiscoveryAddressAdded(DiscoveryAddressAddedEventArgs e)
 {
     if (DiscoveryAddressAdded != null)
         DiscoveryAddressAdded(this, e);
 }
Exemple #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());
 }
 private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     AddDiscoveryActivityManagerToUi(e.ServiceInfo);
 }
Exemple #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;
                }
            }));
        }
Exemple #5
0
 private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     if(e.ServiceInfo.Code != "139")
         StartClient(e.ServiceInfo.Address);
 }