08 2011 档案
摘要:using System;using System.Collections.Generic;using System.Text;using System.Net.Sockets;using System.Net;using System.Threading;using System.Runtime.InteropServices;namespace ConsoleApplication2{ class Program { static Socket m_sListen; static void Main(string[] args) { ...
阅读全文
摘要:服务端和客户是通过这样一个结构体进行通信的using System;using System.IO;using System.Runtime.InteropServices;namespace AUS.Common{ /// <summary> /// 通信结构体 /// </summary> [Serializable] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct Packet { public cmd cmd; public int len;...
阅读全文
摘要:private void treeView1_AfterCheck(object sender, TreeViewEventArgs e){ if (e.Action != TreeViewAction.ByMouse) return; SetParentNode(e.Node); SetChildNode(e.Node);}private void SetParentNode(TreeNode node){ if (node.Level > 0) { node.Parent.Checked = true; SetParentNode(node.Parent); }}private vo
阅读全文