private void accept_Click(object sender, RoutedEventArgs e)
        {
            _Mode = Mode.InCall;

            udp.SendMessageTo(UDP.RAudiocall + hostIP, hostIP);
            AudioConf audioConf = new AudioConf(window, hostIP);

            window.audioConf = audioConf;
            if (AudioConf.audio.sources.Count > 0)
            {
                audioConf.Show();
                audioConf.statusLabel.Content = "Connected to Host ...";
                audioConf.AddUser(hostIP);
                audioConf.MakeUserPreview(hostIP, AudioPreview.Mode.InCall);
            }
            else
            {
                _Mode = Mode.InCall;
                udp.SendMessageTo(UDP.RemoveMemberA, hostIP);
            }
            window.Dispatcher.Invoke((Action)(() =>
            {
                window.waiting.Close();
            }));
        }
 private void audioConfB_Click(object sender, RoutedEventArgs e)
 {
     audioConf        = new AudioConf(this, hostIP);
     audioConf.IsHost = true;
     audioConf.AddMember.IsEnabled = true;
     audioConf.Show();
     audioConf.statusLabel.Content = "Waiting For Users's Responses...";
     foreach (IPAddress ip in audioConf.requestedUsers)
     {
         audioConf.MakeUserPreview(ip, AudioPreview.Mode.Watting);
     }
     audioConf.Start();
 }
 public AddMembers(AudioConf vc)
 {
     this.audioConf = vc;
     this.videoConf = null;
     InitializeComponent();
     ips        = new List <System.Net.IPAddress>();
     this.Title = "AddMember";
     foreach (User user in UserList.Users)
     {
         if (!vc.Users.Contains(user.ip) && !MainWindow.hostIPS.Contains(user.ip))
         {
             listView.Items.Insert(listView.Items.Count, user.nick + " " + user.ip);
             ips.Insert(ips.Count, user.ip);
         }
     }
 }