Esempio n. 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();
        }
 public bool Stop()
 {
     uint timer = Log.InformationTimerStart ("Stopping DPAP");
     if (sd != null) {
         sd.Stop ();
         sd.Found -= OnServiceFound;
         //locator.Removed -= OnServiceRemoved;
         sd = null;
     }
     return true;
 }
Esempio n. 3
0
        public bool Stop()
        {
            uint timer = Log.InformationTimerStart("Stopping DPAP");

            if (sd != null)
            {
                sd.Stop();
                sd.Found -= OnServiceFound;
                //locator.Removed -= OnServiceRemoved;
                sd = null;
            }
            //Log.DebugTimerPrint (timer, "BeagleService shutdown took {0}");
            return(true);
        }
Esempio n. 4
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;
            }
        }
Esempio n. 5
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 bool Stop ()
		{
			uint timer = Log.InformationTimerStart ("Stopping DPAP");
			if (sd != null) {
                sd.Stop ();
                sd.Found -= OnServiceFound;
                //locator.Removed -= OnServiceRemoved;
                sd = null;
            }
			//Log.DebugTimerPrint (timer, "BeagleService shutdown took {0}");	
			return true;
		}
        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 ();
        }