摘要: 在Form的CS文件里面加入下面方法,四个参数对应四个值。在不同的方法内写触发方法。 const int WM_SYSCOMMAND = 0x112; const int SC_CLOSE = 0xF060; const int SC_MINIMIZE = 0xF020; const int SC_ 阅读全文
posted @ 2022-01-17 09:36 月下独酌孤醉 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 注:此方法添加的按钮固定位置,不能移动,如果想跟着dgv滚动条拉动移动,最好是重写 System.Windows.Forms.Button btn = new System.Windows.Forms.Button();//创建Buttonbtn btn.Text = "<";//设置button文 阅读全文
posted @ 2021-03-01 09:43 月下独酌孤醉 阅读(272) 评论(0) 推荐(0) 编辑
摘要: System.Threading.Thread thread; public void Dispose() { if (thread.ThreadState == ThreadState.Running) { thread.Abort(); } } 阅读全文
posted @ 2021-02-23 14:36 月下独酌孤醉 阅读(59) 评论(0) 推荐(0) 编辑
摘要: //在指定路径生成文档,内容是你运行步骤的时间+输入的msg public static void WriteMessage(string msg) { File.AppendAllText(Path, DateTime.Now.ToLongTimeString() + ":\t" + msg + 阅读全文
posted @ 2021-02-23 14:33 月下独酌孤醉 阅读(32) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 判断直线和圆的交点 /// </summary> public bool GetIntersectionCircle(double startx, double starty, double endx, double endy, double centerx, d 阅读全文
posted @ 2021-02-23 14:27 月下独酌孤醉 阅读(248) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 求直线和直线交点 /// </summary> public double[] GetIntersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, 阅读全文
posted @ 2021-02-23 14:25 月下独酌孤醉 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 通过判断与圆的交点找到交点后,可通过这一步来判断交点是否在圆弧上面 //这个是判断顺时针还是逆时针旋转 if (templine.EndAngle - templine.StartAngle >= 0) direction = true; else direction = false; public 阅读全文
posted @ 2021-02-23 14:24 月下独酌孤醉 阅读(505) 评论(0) 推荐(0) 编辑