摘要: 如果是双IP就不能用这种方式了 需要把ip写到配置文件中了 public static string GetLocalIP() { try { string IP = ConfigurationManager.AppSettings["LocalIP"]; if (string.IsNullOrWh 阅读全文
posted @ 2020-07-24 11:55 Sorry名米 阅读(102) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 获取FTP文档 /// </summary> /// <returns>路径</returns> public static string DisplayFileFromServer(Uri serverUri, out string errorMsg,strin 阅读全文
posted @ 2020-07-24 11:21 Sorry名米 阅读(818) 评论(0) 推荐(0) 编辑
摘要: using iTextSharp.text; using iTextSharp.text.pdf; /// <summary> /// 图片转成pdf /// </summary> public static void ConvertJPG2PDF(string jpgfile, string pd 阅读全文
posted @ 2020-07-24 11:14 Sorry名米 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 点击事件 public bool beginMove = false;//初始化鼠标位置 public int currentXPosition; public int currentYPosition; private void _MouseDown(object sender, MouseBut 阅读全文
posted @ 2020-07-24 11:00 Sorry名米 阅读(377) 评论(0) 推荐(0) 编辑
摘要: /// <summary>根据日期,获得星期几</summary> /// <param name="y">年</param> /// <param name="m">月</param> /// <param name="d">日</param> /// <returns>星期几,1代表星期一;7代 阅读全文
posted @ 2020-07-24 10:40 Sorry名米 阅读(121) 评论(0) 推荐(0) 编辑
摘要: public class NumberConvert { /// <summary> /// 转换数字 /// </summary> protected static long CharToNumber(char c) { switch (c) { case '一': return 1; case 阅读全文
posted @ 2020-07-24 10:37 Sorry名米 阅读(293) 评论(0) 推荐(0) 编辑
摘要: using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.L 阅读全文
posted @ 2020-07-24 10:34 Sorry名米 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1 public class Log 2 { 3 /// <summary> 4 /// 记录状态 5 /// </summary> 6 /// <param name="str">信息内容</param> 7 public static void WriteLog(string Message) 阅读全文
posted @ 2020-07-24 10:33 Sorry名米 阅读(125) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 文件转byte[] /// </summary> /// <param name="Path">绝对路径</param> /// <returns>byte[]</returns> public static byte[] FileToBytes(string P 阅读全文
posted @ 2020-07-24 10:29 Sorry名米 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 1 #region 检测指定目录是否存在 2 /// <summary> 3 /// 检测指定目录是否存在 4 /// </summary> 5 /// <param name="directoryPath">目录的绝对路径</param> 6 /// <returns>bool</returns> 阅读全文
posted @ 2020-07-24 10:28 Sorry名米 阅读(256) 评论(0) 推荐(0) 编辑