Beispiel #1
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            MsgBoardCast boardcast = new MsgBoardCast();

            boardcast.BoardCast(wawCMD.WAW_BC_GETLIST);
            boardcast.BoardCastClose();
        }
Beispiel #2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            //开启监听线程
            startreceive    = new DataReceive(lvwUsers, lblUserCount);
            udplistenthread = new Thread(new ThreadStart(startreceive.StartListenUdp));
            udplistenthread.IsBackground = true;
            udplistenthread.Start();

            MsgBoardCast boardcast = new MsgBoardCast();

            boardcast.BoardCast(wawCMD.WAW_BC_SIGNIN);
            boardcast.BoardCastClose();

            int i = 0;

            foreach (IPAddress addr in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
            {
                if (addr.AddressFamily == AddressFamily.InterNetwork)
                {
                    cmbIpList.Items.Add(addr.ToString());
                    if (addr.ToString() == InfoSet.IpPort.Address.ToString())
                    {
                        cmbIpList.SelectedIndex = i;
                    }
                    i++;
                }
            }
        }