-
用C#实现的经典ASTAR寻路算法
游戏里常用的寻路算法,用C#实现的经典ASTAR寻路算法,VS2013/2017编译通过(Classical ASTAR routing algorithm implemented by C# is compiled and passed by VS2013/2017.)
- 2020-06-16 00:40:02下载
- 积分:1
-
C语言各种标准函数的使用
1. 掌握C语言各种标准函数的使用,并学会通过在线帮助了解标准函数使用方法以及对应的头文件。 2. 掌握C数据输入输出方法,包括格式化I/O、字符串I/O以及cin/cout流I/O。 3. 学会正确使用逻辑运算符及逻辑表达式,注意“= =”“=”的区别。 4. 掌握选择分支结构的使用,包括if语句 和switch语句(两种形式)。 5. 注意培养良好的程序设计习惯和风格.通过编程及上机调试,进一步提高编程能力.
- 2022-01-26 02:49:20下载
- 积分:1
-
GLRect
Opengl编程实现画矩形,且矩形位置大小可以随窗口位置大小变化做相应变化(Opengl programming draw a rectangle, and the rectangle position size can change with the window size changes accordingly)
- 2015-11-24 13:43:30下载
- 积分:1
-
实验10:8X8LED点阵(显示数字)
说明: 基于51单片机点阵显示程序,C语言程序,可以作为子程序使用(Based on 51 MCU dot matrix display program, C language program, can be used as a subroutine)
- 2020-06-24 07:00:02下载
- 积分:1
-
cs1.6全世界最全的源码
说明: CS1.6全网最全源码,资源是长期收集整合(CS1.6 the most complete source code of the whole network, the resource is long-term collection and integration)
- 2020-02-13 09:32:16下载
- 积分:1
-
Tdcoorconvert
根据读取到的已知控制点的坐标,计算在该区域内的平面转换五参数,该五参数不同于当前使用较多的四参数(According to the known control point to read the coordinates to calculate the plane in the region converted five parameters, the five parameters to use more different from the current four-parameter)
- 2010-09-24 21:50:29下载
- 积分:1
-
jokdr
由散点插值生成等值线,并且提供颜色选择工具,共有三种插值方法(Generating isolines from scattered interpolation and providing a color selection tool, there are three interpolation methods)
- 2018-11-21 16:03:28下载
- 积分:1
-
利用c#写的jpg拼图软件,可以随意剪切和拼接(钩子源码)
利用c#写的jpg拼图软件,可以随意剪切和拼接using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Runtime.InteropServices;namespace AutoDrawRect{ public class MouseHook { //好吧这个没有用到 private bool isSet; public bool IsSet { get { return isSet; } } //这个也没有用到 private int handleOfHook; public int HandleOfHook { get { return handleOfHook; } } //这个还是没有用到、、、淡定! private bool isStopMsg; public bool IsStopMsg { get { return isStopMsg; } set { isStopMsg = value; } } //自己定义了一个事件 放到Hook里面去 public delegate void MEventhandler(object sender, MouseInfoEventArys e); public event MEventhandler HooKMouseEvent; [DllImport("user32.dll")]//设置钩子 第二个参数为回调函数指针 public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hmod, int dwThreadid); [DllImport("user32.dll")]//传递到下一个钩子 public static extern int CallNextHookEx(int hHook, int nCode, IntPtr wParam, IntPtr lParam); [DllImport("user32.dll")]//卸载钩子 public static extern bool UnhookWindowsHookEx(int hHook); [DllImport("kernel32.dll")]//获取模块句柄 public static extern IntPtr GetModuleHandle(string lpModuleName); public const int WH_MOUSE_LL = 14;//全局鼠标Hook 7是局部的 13全局键盘 2局部键盘 public delegate int HookProc(int nCode, IntPtr wParam, IntPtr lParam);//话说c#里面委托就是函数指针?、 private const int WM_LBUTTONDOWN = 0x201; //在Hook里面判断是否左键点下 private const int WM_RBUTTONUP = 0x205; //在Hook里面判断是否右键抬起 public struct POINT {//鼠标位置的结构体 public int x; public int y; } public struct MouseLLInfo {//全局鼠标Hook的结构体 public POINT pt; //其实这里可以用Point只是这个新建的类里面没有应用System.Windows.Forms(应该是这个) public int mouseData; public int flags; public int time; public int dwExtraInfo; } GCHandle gc;//好吧 话说就是应为这个东西害得我研究了两天 没有这个的话 程序运行一会儿就提示崩溃了 //因为垃圾回收期把我的回调函数当垃圾收了 所以运行程序的时候 一会儿就提示我 一个垃圾的回调导致程序崩溃 //在非托管调用托管的时候 必须保持托管代码的或活动性 大概就这个意思 反正就是被收废品的收了、害的我用.net3.5用其他方式设置Hook public int MouseHookProcedure(int nCode, IntPtr wParam, IntPtr lParam) {//这个就是回调函数了 if (nCode >= 0 && HooKMouseEvent != null) {//先判断是否事件被绑定(感觉有点多余的判断 丫的我不在上面绑定 我写Hook干嘛) //话说是把内存的什么什么转换成结构体 MouseLLInfo mouseInfo = (MouseLLInfo)Marshal.PtrToStructure(lParam, typeof(MouseLLInfo)); Btn btn = Btn.None; //自己定义的一个枚举 里面只有三个值 if (wParam == (IntPtr)WM_LBUTTONDOWN) { //如果左键被点下 btn = Btn.LeftDowm; } else if (wParam == (IntPtr)WM_RBUTTONUP) { //如果右键被抬起 btn = Btn.RightUp; } //好吧 我就不知道当时我怎么想的 在Hook里面获取的坐标 有负数的现象 所以在那边 我没用这个坐标 MouseInfoEventArys e = new MouseInfoEventArys(btn, mouseInfo.pt.x, mouseInfo.pt.y); HooKMouseEvent(this, e);//触发绑定到这个上面的事件 } return CallNextHookEx(handleOfHook, nCode, wParam, lParam);//继续下一个钩子 } public bool SetMouseHook() { //设置Hook if (isSet) {//如果已经设置了 就不要设置啦、、、 return false; } HookProc MouseCallBack = new HookProc(MouseHookProcedure); handleOfHook = SetWindowsHookEx(WH_MOUSE_LL, MouseCallBack, GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName), 0); if (handleOfHook != 0) {//如果设置成功、、 gc = GCHandle.Alloc(MouseCallBack);//这个就是那个什么什么、、然后我的回调就不会被收废品的拣去了 isSet = true; return true; } return false; } public bool UnLoadMouseHook() { if (!isSet) {//如果装都没有装那么久不要卸载啦、、 return false; } if (UnhookWindowsHookEx(handleOfHook)) { gc.Free();//将回调释放掉、、 isSet = false; return true; } return false; } } public enum Btn//我只感觉到这三个有用、(应该是两个 左键点下 右键抬起) { LeftDowm, RightUp, None } public class MouseInfoEventArys {//话说定义事件的时候都是这么写的 所以我也弄一个内出来保存事件参数 private int x;//坐标 多余的后来才发现 鼠标慢慢贴近屏幕边缘的时候 3 2 1 0 -1 、、丫的 负数都出来了 public int X { get { return x; } } private int y;//坐标 public int Y { get { return y; } } private Btn mBtn; public Btn MBtn { get { return mBtn; }//鼠标的情况 } public MouseInfoEventArys(Btn btn,int x,int y) {//构造器 mBtn = btn; this.x = x; this.y = y; } }}
- 2013-12-22下载
- 积分:1
-
Aer
说明: 一种改进的时钟定时抖动估计方法An improved estimation of clock timing jitter(An improved estimation of clock timing jitter)
- 2011-04-05 08:55:47下载
- 积分:1
-
LAMMPS常用建模方法总结
建模是进行材料模拟的第一步,这里对LAMMPS常用的建模方法进行总结(我平时用到的,难免不全面)。 概况来说,建模方法有两种:内部建模和外部建模。(Modeling is the first step in the process of material simulation. This is a summary of the modeling methods commonly used in the LAMMPS. In general, there are two types of modeling approaches: internal modeling and external modeling.)
- 2017-12-07 04:23:36下载
- 积分:1