找传奇、传世资源到传世资源站!

C# 远程桌面、电子白板、视讯、摄像头、话筒通信源码下载

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

试用说明:

(1)将服务端部署到一台服务器上,然后启动OMCS.Server.exe。

(2)修改客户端配置文件中的服务器的IP,在一台机器上启动客户端,登录一个帐号,比如aa01.

(3)在另一台机器上启动客户端,登录另一个帐号,比如aa02.

(4)aa01可以在主界面的TextBox中中输入aa02,并点击后面的按钮,来连接aa02的视频。

(5)aa02也可以在其UI中输入aa01,并点击后面的按钮,来连接aa01的视频。

(6)测试视讯时,两个客户端最好在不同的房间。

(7)测试白板时,需要连接到同一个用户的白板,才能协同。C# 远程桌面、电子白板、视讯、摄像头、话筒通信源码下载 C#语言基础-第1张C# 远程桌面、电子白板、视讯、摄像头、话筒通信源码下载 C#语言基础-第2张
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using OMCS.Passive;using ESBasic;namespace OMCS.Demos.Simplest.Client{ public partial class DesktopForm : Form { private string ownerID; public DesktopForm(string friendID) { InitializeComponent(); this.desktopConnector1.WatchingOnly = false; this.ownerID = friendID; this.Text = string.Format("正在访问{0}的桌面", this.ownerID); this.desktopConnector1.OwnerScreenResolutionChanged = new CbGeneric<Size>(desktopConnector1_OwnerScreenResolutionChanged); this.desktopConnector1.ConnectEnded = new CbGeneric<ConnectResult>(desktopConnector1_ConnectEnded); this.desktopConnector1.BeginConnect(this.ownerID); } void desktopConnector1_OwnerScreenResolutionChanged(Size obj) { this.SetLocation(); this.desktopConnector1.Invalidate(); } void desktopConnector1_ConnectEnded(ConnectResult result) { if (this.InvokeRequired) { this.BeginInvoke(new CbGeneric<ConnectResult>(this.desktopConnector1_ConnectEnded), result); } else { if (result != ConnectResult.Succeed) { MessageBox.Show("连接失败!" result.ToString()); } this.SetLocation(); } } //关闭窗口时,主动断开连接,并释放连接器。 private void DesktopForm_FormClosing(object sender, FormClosingEventArgs e) { this.desktopConnector1.Disconnect(); this.desktopConnector1.Dispose(); } private void DesktopForm_Resize(object sender, EventArgs e) { this.SetLocation(); } private void SetLocation() { this.desktopConnector1.Size = this.desktopConnector1.DesktopSize; int x = 0; int y = 0; if (this.Width > this.desktopConnector1.Size.Width) { x = (this.Width - this.desktopConnector1.Size.Width) / 2; } if (this.Height > this.desktopConnector1.Size.Height) { y = (this.Height - this.desktopConnector1.Height) / 2; } this.desktopConnector1.Location = new Point(x, y); } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复