예제 #1
0
        public DPAPPageWidget()
        {
            Console.WriteLine("DPAP Page widget ctor!");
            tree = new TreeView();
            Add(tree);
            TreeViewColumn albumColumn = new Gtk.TreeViewColumn();

            //albumColumn.Title = "album";

            Gtk.CellRendererText albumNameCell = new Gtk.CellRendererText();
            albumNameCell.Visible = true;
            albumColumn.PackStart(albumNameCell, false);
            tree.AppendColumn(albumColumn);

            list       = new TreeStore(typeof(string));
            tree.Model = list;

            albumColumn.AddAttribute(albumNameCell, "text", 0);

            tree.Selection.Changed += OnSelectionChanged;
            sd          = new DPAP.ServiceDiscovery();
            sd.Found   += OnServiceFound;
            sd.Removed += OnServiceRemoved;
            sd.Start();
        }
예제 #2
0
        public static void Main(string [] args)
        {
            ServiceDiscovery sd = new ServiceDiscovery ();
            sd.Found += OnServiceFound;
            sd.Start ();

            //			sd.Services [0];
            Console.ReadLine ();
            if (sd != null) {
                sd.Stop ();
                sd.Found -= OnServiceFound;
                //locator.Removed -= OnServiceRemoved;
                sd = null;
            }
        }
예제 #3
0
        public static void Main(string [] args)
        {
            ServiceDiscovery sd = new ServiceDiscovery();

            sd.Found += OnServiceFound;
            sd.Start();


//			sd.Services [0];
            Console.ReadLine();
            if (sd != null)
            {
                sd.Stop();
                sd.Found -= OnServiceFound;
                //locator.Removed -= OnServiceRemoved;
                sd = null;
            }
        }
        public DPAPPageWidget()
        {
            Console.WriteLine ("DPAP Page widget ctor!");
            tree = new TreeView ();
            Add (tree);
            TreeViewColumn albumColumn = new Gtk.TreeViewColumn ();
            //albumColumn.Title = "album";

            Gtk.CellRendererText albumNameCell = new Gtk.CellRendererText ();
            albumNameCell.Visible = true;
            albumColumn.PackStart (albumNameCell,false);
            tree.AppendColumn (albumColumn);

            list = new TreeStore (typeof (string));
            tree.Model = list;

            albumColumn.AddAttribute (albumNameCell, "text", 0);

            tree.Selection.Changed += OnSelectionChanged;
            sd = new DPAP.ServiceDiscovery ();
            sd.Found += OnServiceFound;
            sd.Removed += OnServiceRemoved;
            sd.Start ();
        }