摘要: //主线程 public delegate void UpdateMessage(string mes); public void UpdatePortMessage(string mes) { this.txtMessage.AppendText(string.Format("Connected {0}. succeed", mes) + "\r\n"); this.txtClientIP.Text = mes; } // 线程1 UpdateMessage upPort = new UpdateMessage(Up... 阅读全文
posted @ 2014-03-24 16:48 寻梦放歌 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 1 /// 2 /// 删除文件夹下的文件和文件夹 3 /// 4 /// 5 public static void DeleteFolder(string directoryPath) 6 { 7 foreach (string d in Directory.GetFileSystemEntries(directoryPath)) 8 { 9 if (File.Exists(d))10 { ... 阅读全文
posted @ 2014-03-24 16:23 寻梦放歌 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 int startYear = int.Parse(DateTime.Now.Year.ToString()); 2 int startMouth = int.Parse(DateTime.Now.Month.ToString()); 3 int startDay = int.Parse(DateTime.Now.Day.ToString()); 4 int startHour = 0, startMinutes = 0, startSecond = 0; 5 ... 阅读全文
posted @ 2014-03-24 15:10 寻梦放歌 阅读(220) 评论(0) 推荐(0) 编辑