Esempio n. 1
0
        private void delVideoRequest(String otherNeck, String otherIP, int otherSendPort, int otherRecvPort)
        {
            DialogResult dr =
                MessageBox.Show("来自:" + otherNeck, "视频聊天请求", MessageBoxButtons.YesNo);

            if (dr == DialogResult.Yes)
            {
                // 确认私聊窗口
                PrivateForm pf = null;
                if (privateChatForms.Keys.Contains(otherNeck))
                {
                    pf = privateChatForms[otherNeck];
                }
                else
                {
                    pf = createPrivateForm(otherNeck);
                }

                // 切入视频聊天模式
                pf.ToggleVideoMove(true);

                // ChaitClient - 接受视频聊天
                ChaitClient.Instance.AcceptVideo(otherNeck, IPAddress.Parse(otherIP), otherSendPort, otherRecvPort, pf.OnFrameReceivedHandler);
            }
            else
            {
                ChaitClient.Instance.RefuseVideo(otherNeck);
            }
        }
Esempio n. 2
0
        private void delVideoAccepted(String otherNeck, String otherIP, int otherSendPort, int otherRecvPort)
        {
            // 获取私聊窗口
            PrivateForm pf = null;

            if (privateChatForms.Keys.Contains(otherNeck))
            {
                pf = privateChatForms[otherNeck];
            }
            else
            {
                pf = createPrivateForm(otherNeck);
            }

            // 切入视频模式
            pf.ToggleVideoMove(true);

            // ChaitClient - 开始视频
            ChaitClient.Instance.RequesterStartVideo(otherNeck, IPAddress.Parse(otherIP), otherSendPort, otherRecvPort);
        }