start_pos = end_pos + 4;
end_pos = info_data_str.IndexOf("y_2:");
point_x = Convert.ToInt32(info_data_str.Substring(start_pos, end_pos - start_pos));
start_pos = end_pos + 4;
end_pos = info_data_str.IndexOf("#####");
point_y = Convert.ToInt32(info_data_str.Substring(start_pos, end_pos - start_pos));
Point right_bottom_point = new Point(point_x, point_y);
byte[] image_bytes = new byte[buf.Length-50];
Array.Copy(buf, 50, image_bytes, 0, image_bytes.Length);
Image data = Screen.BytesToImg(image_bytes);
if (null != display_rev_data_func)
{
display_rev_data_func(left_top_point,right_bottom_point,data);
}
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
private static string getLocalIPAddress()
{
System.Net.IPAddress addr;
// 获得本机局域网IP地址
|