Ejemplo n.º 1
0
        void ReadService()
        {
            strRoutine = this.Name + "; " + MethodBase.GetCurrentMethod().Name + "; ";
            try
            {
                dataGridView1.DataSource = null;
                //Sharvari:15/03/2019
                dataGridView1.Rows.Clear();
                dataGridView1.ColumnCount = 4;

                dataGridView1.Columns[0].Name = "MAC";
                dataGridView1.Columns[1].Name = "MACHost";

                dataGridView1.Columns[2].Name = "Host Name";
                dataGridView1.Columns[3].Name = "IP";
                DNSSDService      service      = new DNSSDService();
                DNSSDEventManager eventManager = new DNSSDEventManager();
                //**********ServiceFound************//
                eventManager.ServiceFound += new _IDNSSDEvents_ServiceFoundEventHandler(eventManager_ServiceFound);
                //   DNSSDService browse = service.Browse(0, 0, "_axis-video._tcp", null, eventManager);
                //DNSSDService browser = service.Browse(0, 0, "_http._tcp", null, eventManager);
                DNSSDService browser1 = service.Browse(0, 0, "_Workstation._tcp", "local.", eventManager);
                DNSSDRecord  records  = new DNSSDRecord();
                //Application.EnableVisualStyles();
                //Application.SetCompatibleTextRenderingDefault(false);
                //Application.Run(new frmBonjour());
            }
            catch (Exception ex)
            {
                csLog.LogError(strRoutine + ex.Message);
            }
        }
Ejemplo n.º 2
0
 private static void Mgr_RecordRegistered(DNSSDRecord record, DNSSDFlags flags)
 {
     Console.WriteLine("Record registered");
 }