Ejemplo n.º 1
0
        private void Refresh_Click(object sender, RoutedEventArgs e)
        {
            NoMembers  = 0;
            NoGroup    = 0;
            NoSelected = 0;
            groupLists.Clear();
            listView.Clear();
            _index.Clear();
            selectedFiles.Clear();

            hostIPS.Clear();
            foreach (System.Net.NetworkInformation.NetworkInterface ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
            {
                foreach (var x in ni.GetIPProperties().UnicastAddresses)
                {
                    if (x.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                    {
                        hostIPS.Add(x.Address);
                        System.Diagnostics.Debug.WriteLine(x.Address);
                    }
                }
            }
            UserList.ClearAllList();
            Groups.Items.Clear();
            BroadCasting.Do();
        }
Ejemplo n.º 2
0
 private void broadcast_proc()
 {
     while (true)
     {
         BroadCasting.Do();
         Thread.Sleep(REFRESH_INTERVAL * 1000);
     }
 }