private void VideoConfB_Click(object sender, RoutedEventArgs e) { videoConf = new VideoConf(this, hostIP); videoConf.IsHost = true; videoConf.AddMember.IsEnabled = true; if (videoConf.SetVideoSources()) { videoConf.Show();// CreateVideoConf(null); videoConf.statusLabel.Content = "Waiting For Users's Responses..."; //videoConf.requestedUsers.Clear(); //foreach(string group in groupLists.Keys) //{ // foreach (UserView uv in listView[group].SelectedItems) // videoConf.requestedUsers.Add(uv.u_ip); //} foreach (IPAddress ip in videoConf.requestedUsers) { // videoConf.vp.Add(ip, new VideoPreview(VideoPreview.Mode.Watting, null) { Nick = UserList.Get(ip).nick }); // videoConf._stack.Children.Add(videoConf.vp[ip]); videoConf.MakeUserPreview(ip, VideoPreview.Mode.Watting); } videoConf.Start(); } }
private void accept_Click(object sender, RoutedEventArgs e) { _Mode = Mode.InCall; if (!isRemote) { udp.SendMessageTo(UDP.RVideocall + hostIP, hostIP); VideoConf videoConf = new VideoConf(window, hostIP); window.videoConf = videoConf; if (videoConf.SetVideoSources()) { videoConf.Show(); videoConf.statusLabel.Content = "Connected to Host ..."; videoConf.AddUser(hostIP); videoConf.MakeUserPreview(hostIP, VideoPreview.Mode.InCall); } else { _Mode = Mode.InCall; udp.SendMessageTo(UDP.RemoveMember, hostIP); } window.Dispatcher.Invoke((Action)(() => { window.waiting.Close(); })); } else { udp.SendMessageTo(UDP.RRemote, hostIP); window.Dispatcher.Invoke((Action)(() => { window.remote = new Remote(window, hostIP); window.remote.StartSending(); window.remoteWin.Close(); window.Remote.Content = "Stop Remote"; })); } }