基本信息
源码名称:C# 终结者2压枪 辅助工具源码
源码大小:0.13M
文件格式:.rar
开发语言:C#
更新时间:2018-01-26
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 3 元 
   源码介绍

吃鸡手动压枪ak无后坐力压枪仅供学习使用!

using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Threading;
using MaojiuCL;

namespace 终结者2压枪
{
    
    public partial class 连点器cs : Form
    {
        [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
        private static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
        public 连点器cs()
        {
            InitializeComponent();
        }
        List<int > mouse=new List<int> ();//储存鼠标动作
        int i = -1;//初值为-1
        const int MOUSEEVENTF_LEFTDOWN = 0x0002; //模拟鼠标左键按下
        const int MOUSEEVENTF_LEFTUP = 0x0004; //模拟鼠标左键抬起 
        private void 连点器cs_MouseDown(object sender, MouseEventArgs e)
        {
           
        }
        
        private void 连点器cs_MouseUp(object sender, MouseEventArgs e)
        {
           
                   
        }
        private Hook hook = Hook.GetInstance();
        private void 连点器cs_Load(object sender, System.EventArgs e)
        {
            MessageBox.Show("开启完毕,系统已装载钩子");
            hook.OnMouseDown  = new MouseEventHandler(OnMouseDown);
            hook.OnMouseUp  = new MouseEventHandler(OnMouseUp);
            hook.InstallMouseHook();//装载鼠标钩子
        }
        private void OnMouseUp(object sender, MouseEventArgs e)
        {
            mouse.Add(1);//弹起就往list中加一个1
            i  ;
            if (mouse[i - 1] == mouse[i])//当前一位和后一位相同则停止
            {
                foreach (int j in mouse)////遍历出结果查看是否完成
                {
                    richTextBox1.Text  = j.ToString();//用来判断是否完成
                }
                MessageBox.Show("over");//如果结束则提醒
                mouse.Clear();
                i = -1;
            }

        }
        private void OnMouseDown(object sender, MouseEventArgs e)
        {

            mouse.Add(0);//按下就往list中加一个0
            i  ;//用来遍历
            mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, Cursor.Position.X, Cursor.Position.Y, 0, 0);//模拟点击
            Thread.Sleep(10);

        }

        private void 连点器cs_FormClosing(object sender, FormClosingEventArgs e)
        {
            hook.UninstallMouseHook();//卸载鼠标钩子
            MessageBox.Show("系统已卸载钩子");
        }
    }
}