using System.Drawing;
using Client;
namespace RemoteControl
{
public class RevThread
{
public delegate void displayRevData(Point left_top_point,Point right_bottom_point,Image data);
public displayRevData display_rev_data_func;
private const int local_port = 61002;
private UdpClient rev_data_udp;
private Thread rev_data_thread;
public RevThread(displayRevData disp_function)
{
this.display_rev_data_func = disp_function;
ThreadStart ts = new ThreadStart(rev_data);
rev_data_thread = new Thread(ts);
rev_data_thread.Start();
}
public void send_monitor_to_client(string local_ip_address,string dest_ip_address)
{
send_monitor_to_client(local_ip_address,dest_ip_address, false);
}
public void send_monitor_to_client(string local_ip_address,string dest_ip_address,bool send_all_screen)
{
//IP地址及端口信息
string command_string = "##IP:" + local_ip_address + "#IPEND###PORT:" + local_port.ToString() + "#PORTEND##";
if (true == send_all_screen)
{
command_string = command_string + "#SENDALL#";
}
//添加控制客户机的命令串,在客户端寻找ORDER:与CMD_END##之间的串 command_string = command_string+ "ORDER:" + Program .order_string ;
|