コード例 #1
0
 protected void OnDiscoveryAddressAdded(DiscoveryAddressAddedEventArgs e)
 {
     if (DiscoveryAddressAdded != null)
         DiscoveryAddressAdded(this, e);
 }
コード例 #2
0
ファイル: Main.cs プロジェクト: madebysoren/NooSphere
 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());
 }
コード例 #3
0
 private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     AddDiscoveryActivityManagerToUi(e.ServiceInfo);
 }
コード例 #4
0
ファイル: Desk.xaml.cs プロジェクト: madebysoren/NooSphere
        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;
                }
            }));
        }
コード例 #5
0
ファイル: Tablet.xaml.cs プロジェクト: madebysoren/NooSphere
 private void DiscDiscoveryAddressAdded(object o, DiscoveryAddressAddedEventArgs e)
 {
     if(e.ServiceInfo.Code != "139")
         StartClient(e.ServiceInfo.Address);
 }