摘要:
获取本机IP /// <summary> /// 获取本机IP地址 /// </summary> /// <returns></returns> private string GetHostAddressIP() { IPHostEntry ipHostEntry = Dns.GetHostEntr 阅读全文
摘要:
删除时间范围外文件 private static void DeleteOldLogs() { try { // string s =Directory.GetCurrentDirectory(); var path = Application.StartupPath + "\\ErrLog"; i 阅读全文
摘要:
根据进程名称关闭 public static void KillProcess(string Pname) { foreach (var v in Process.GetProcessesByName(Pname) { v.Kill(); } } 阅读全文
摘要:
窗体关闭事件 private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) { try { if (e.CloseReason == CloseReason.UserClosing) { if (MessageBox. 阅读全文