private void JoinMultiVChatRoomCallback(int code, Int64 channel_id, string json_extension) { if (code == 200) { System.Diagnostics.Debug.WriteLine("进入房间:" + json_extension); //进入房间成功 Action action = () => { MultiVChatForm vchat = new MultiVChatForm(room_name); vchat.Show(); }; this.Invoke(action); } else { Action action = () => { MessageBox.Show("加入房间失败-错误码:" + code.ToString()); }; this.BeginInvoke(action); } }
private void JoinMultiVChatRoomCallback(int code, Int64 channel_id, string json_extension) { if (code == 200) { //进入房间成功 Action action = () => { MultiVChatForm vchat = new MultiVChatForm(_room_name); vchat.Show(); this.Close(); }; this.BeginInvoke(action); } else { Action action = () => { MessageBox.Show("加入房间失败-错误码:" + code.ToString()); VChatAPI.End(); }; this.BeginInvoke(action); } }