摘要: class HSLColor { private int _alpha = 255; public int _hue = 0; public double _saturation = 1d; public double _lightness = 1d; //public double H; //pu 阅读全文
posted @ 2018-03-06 17:16 程序猿kid 阅读(163) 评论(0) 推荐(0) 编辑
摘要: public Window() { InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; this.Topmost = true; } 阅读全文
posted @ 2018-03-06 17:15 程序猿kid 阅读(9279) 评论(0) 推荐(1) 编辑
摘要: https://www.cnblogs.com/smiler/archive/2013/07/14/3189450.html http://blog.csdn.net/dh164645822/article/details/76229741 阅读全文
posted @ 2018-03-06 17:14 程序猿kid 阅读(136) 评论(0) 推荐(0) 编辑
摘要: public string[] GetOpenFileDialogReturnFileFullName(bool multiSelect = false) { System.Windows.Forms.OpenFileDialog opdialog = new System.Windows.Form 阅读全文
posted @ 2018-03-06 17:13 程序猿kid 阅读(1833) 评论(0) 推荐(0) 编辑
摘要: private void TryConnect(System.Action action) { int retries = 3; while(true) { try { action(); break; //success! } catch { if (--retries == 0) { //... 阅读全文
posted @ 2018-03-06 17:12 程序猿kid 阅读(272) 评论(0) 推荐(0) 编辑
摘要: finally 代码块中的代码是 try-catch 结构执行完后无论有无异常发生都会执行的。finally 代码块中的代码是 try-catch 结构执行完后无论有无异常发生都会执行的。finally 代码块中的代码是 try-catch 结构执行完后无论有无异常发生都会执行的。 重要的事情说三遍 阅读全文
posted @ 2018-03-06 17:11 程序猿kid 阅读(1925) 评论(0) 推荐(0) 编辑
摘要: string name = System.Text.RegularExpressions.Regex.Replace(url, "[<>/\\|:\"?*]", "");//将非法字符去除 阅读全文
posted @ 2018-03-06 17:10 程序猿kid 阅读(1085) 评论(1) 推荐(0) 编辑
摘要: //获取文件MD5算法 private static string GetMD5FromFile(string fileName) { try { FileStream file = new FileStream(fileName, FileMode.Open); System.Security.C 阅读全文
posted @ 2018-03-06 15:26 程序猿kid 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #region CheckBox与TextBox绑定 Dictionary<CheckBox, TextBox> CheckTextBoxDic = new Dictionary<CheckBox, TextBox>(); //找到控件下所有勾选框并与其相对应的文本框绑定 private void 阅读全文
posted @ 2018-03-02 10:27 程序猿kid 阅读(492) 评论(0) 推荐(0) 编辑
摘要: #region 通过当前代码执行路径向上找到相关exe,并根据processes.Length判断是否已启动 private bool CheckAndOpenExe(string exeName) { Process[] processes = Process.GetProcessesByName 阅读全文
posted @ 2018-03-02 10:18 程序猿kid 阅读(6604) 评论(1) 推荐(1) 编辑