Exemplo n.º 1
0
        private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (resolver != null)
            {
                resolver.Stop();
                resolver = null;
            }

            if (browseList.SelectedItem != null)
            {
                try
                {
                    BrowseData data = (BrowseData)browseList.SelectedItem;

                    //
                    // Clicking on a service instance results in starting a resolve operation
                    // that will call us back with information about the service
                    //
                    resolver = service.Resolve(0, data.InterfaceIndex, data.Name, data.Type, data.Domain, eventManager);
                }
                catch
                {
                    MessageBox.Show("Resolve Failed", "Error");
                    Application.Exit();
                }
            }
        }
Exemplo n.º 2
0
        //
        // called when peer target changes
        //
        /// <summary>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            PeerData peer = (PeerData)comboBox1.SelectedItem;

            try
            {
                m_resolver = m_service.Resolve(0, peer.InterfaceIndex, peer.Name, peer.Type, peer.Domain, m_eventManager);
            }
            catch
            {
                MessageBox.Show("Unable to Resolve service", "Error");
                Application.Exit();
            }
        }
Exemplo n.º 3
0
        private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (resolver != null)
            {
                resolver.Stop();
                resolver = null;
            }

            if (browseList.SelectedItem != null)
            {
                try
                {
                    BrowseData data = (BrowseData)browseList.SelectedItem;

                    resolver = service.Resolve(0, data.InterfaceIndex, data.Name, data.Type, data.Domain, eventManager);
                }
                catch
                {
                    MessageBox.Show("Resolve Failed", "Error");
                    Application.Exit();
                }
            }
        }