这个似乎是FTP下载的:#region "Download: File transfer FROM ftp server" /// <summary> /// Copy a file from FTP server to local /// </summary> /// <param name="sourceFilename">Target filename, if required </param> /// <param name="localFilename">Full Read More
UDP的:namespace UDPServer{ class Program { static void Main(string[] args) { int recv; byte[] data = new byte[1024]; //构建TCP 服务器 //得到本机IP,设置TCP端口号 IPEndPoint ipep = new IPEndPoint(IPAddress.Any , 8001); So... Read More
http://topic.csdn.net/u/20080623/08/4bbd2475-45f1-42e3-a613-16b094759ade.htmlSocket通讯:public class XmlSocket { //异步socket诊听 // Incoming data from client.从客户端传来的数据 public static string data = null; // Thread signal.线程 用一个指示是否将初始状态设置为终止的布尔值初始化 ManualResetEvent 类的新实例。 ... Read More
using System.Runtime.InteropServices;using System.Drawing;using System.Drawing.Imaging;namespace PickHead{/// <summary>/// 一个控制摄像头的类/// </summary>public class Pick{private const int WM_USER = 0x400;private const int WS_CHILD = 0x40000000;private const int WS_VISIBLE = 0x10000000;private Read More
ColorMatrix (彩色矩阵) 类位于System.Drawing.Imaging命名空间 先看看下面的代码ColorMatrix cm = new ColorMatrix(new float[][]{ new float[]{0.5f,0.5f,0.5f,0,0},new float[]{0.5f,0.5f,0.5f,0,0},new float[]{0.5f,0.5f,0.5f,0,0},new float[]{0,0,0,1,0,0},new float[]{0,0,0,0,1,0},new float[]{0,0,0,0,0,1}});矩阵系数组成一个 5x5 的线性转换,用于转 Read More
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer(); StopRectTimer.Tick += new EventHandler(timer1_Tick); StopRectTimer.Interval = 50; StopRect. Read More
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace 图形动画...{ public partial class Form1 : Form ...{ public Form1() ...{ InitializeComponent(); } private void Form1_Load(object sender, Read More