private void Form1_Load(object sender, EventArgs e) { try { try { Dm.dmsoft dm = new Dm.dmsoft(); } catch { Func.RegCom("dm.dll"); } mCode = new Dm.dmsoft().GetMachineCode(); regCode = Regedit.GetAppRegKey(RegistryDirName, "RegCode"); if (string.IsNullOrEmpty(regCode) || !HardwareInfo.CheckCode(mCode, regCode, Form1.GameName)) { FrmReg r = new FrmReg(); if (DialogResult.OK != r.ShowDialog()) { this.Close(); return; } } foreach (string s in DTList) { string[] xlNpcs = Directory.GetFiles(PicPath, "自动寻路_" + s + "_*.bmp"); List <XLNPC> xlNpcList = new List <XLNPC>(); foreach (string xl in xlNpcs) { XLNPC xlnpc = new XLNPC(xl.Replace(PicPath, ""), s + "_NPC_" + xl.Replace(PicPath + "自动寻路_" + s + "_", "")); xlNpcList.Add(xlnpc); } if (xlNpcList.Count > 0) { DTNPC d = new DTNPC(s, xlNpcList); dtNpcList.Add(d); } } foreach (DTNPC dt in dtNpcList) { if (!DTListEx.Contains(dt.DT)) { this.cbxDT.Items.Add(dt); } } this.txtDtStr.Text = Regedit.GetAppRegKey(RegistryDirName, "eyouMiMa"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public Form1() { InitializeComponent(); RunReg("RegDll.dll /s"); RunReg("dm.dll /s"); RunReg("eyou.dll /s"); dm = new Dm.dmsoft(); if (dm.Ver() == "") { MessageBox.Show("Can't Create Object dm.dmsoft"); } }
//扫描二维码 public void ScanQR(int ScannerHWD) { DMObeject.GetWindowRect(WindowHandle, out object IntX0, out object IntY0, out object IntX1, out object IntY1); int aimX = (int)IntX0 + 250; int aimY = (int)IntY0 + 250; ActiveWindows(); DMObeject.MoveWindow(ScannerHWD, aimX, aimY); Thread.Sleep(800); DMObeject.SetWindowState(ScannerHWD, 1); //DMObeject.MoveTo(aimX + 240, aimY + 15); DMObeject.MoveTo(240, 15); scanning = true; Task.Run(() => { int c = 1, max = 90; while (scanning) { Dm.dmsoft d = new Dm.dmsoft(); DMObeject.LeftDown(); // mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); for (int i = 0; (i <= max) && scanning; i++) { //DMObeject.MoveTo(aimX + 240 + c * i, aimY + 15); Thread.Sleep(5); //mouse_event(MOUSEEVENTF_MOVE, c, 0, 0, 0); DMObeject.MoveR(c, 0); d.MoveWindow(ScannerHWD, aimX + i, aimY); } d.SetWindowState(ScannerHWD, 1); Thread.Sleep(50); c = -c; //mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); DMObeject.LeftUp(); } MoveWindowsLT(); }); }
public Form1() { InitializeComponent(); AutoRegCom("regsvr32 -s dm.dll"); dm = new Dm.dmsoft(); //var hwnd = dm.FindWindowEx(0, "", "PotPlayer"); var hwnd = dm.FindWindowEx(0, "CHWindow", null); if (dm.BindWindow(hwnd, "dx2", "windows", "windows", 0) == 1) { this.Text = $"绑定成功:" + hwnd; } else { this.Text = $"绑定失败"; return; } }
public Func() { RunReg("RegDll.dll /s"); RunReg("dm.dll /s"); RunReg("eyou.dll /s"); FillProDtInfoList(); dm = new Dm.dmsoft(); string a = dm.Ver(); if (dm.Ver() == "") { throw new Exception("Can't Create Object dm.dmsoft"); } ey = new eyou.Reply(); if (false == Directory.Exists(DtImgPath)) { Directory.CreateDirectory(DtImgPath); } if (false == Directory.Exists(ErrImgPath)) { Directory.CreateDirectory(ErrImgPath); } CurrentDir = Directory.GetCurrentDirectory(); ResetWindowCount = 0; }
private void Form1_Load(object sender, EventArgs e) { try { try { Dm.dmsoft dm = new Dm.dmsoft(); } catch { Func.RegCom("dm.dll"); } mCode = new Dm.dmsoft().GetMachineCode(); regCode = Regedit.GetAppRegKey(RegistryDirName, "RegCode"); if (string.IsNullOrEmpty(regCode) || !HardwareInfo.CheckCode(mCode, regCode, Form1.GameName)) { FrmReg r = new FrmReg(); if (DialogResult.OK != r.ShowDialog()) { this.Close(); return; } } foreach (string s in DTList) { string[] xlNpcs = Directory.GetFiles(PicPath, "自动寻路_" + s + "_*.bmp"); List<XLNPC> xlNpcList = new List<XLNPC>(); foreach (string xl in xlNpcs) { XLNPC xlnpc = new XLNPC(xl.Replace(PicPath, ""), s + "_NPC_" + xl.Replace(PicPath + "自动寻路_" + s + "_", "")); xlNpcList.Add(xlnpc); } if (xlNpcList.Count > 0) { DTNPC d = new DTNPC(s, xlNpcList); dtNpcList.Add(d); } } foreach (DTNPC dt in dtNpcList) { if (!DTListEx.Contains(dt.DT)) { this.cbxDT.Items.Add(dt); } } this.txtDtStr.Text = Regedit.GetAppRegKey(RegistryDirName, "eyouMiMa"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private DmHelper() { Dm = new Dm.dmsoft(); }
public OutputTime() { dm = new Dm.dmsoft(); }
public void MoveWindowsRT() { Dm.dmsoft dm = new Dm.dmsoft(); dm.MoveWindow(WindowHandle, dm.GetScreenWidth() - width, 0); }
public void MoveWindowsLT() { Dm.dmsoft dm = new Dm.dmsoft(); dm.MoveWindow(WindowHandle, 0, 0); }
public DaMo() { DMObeject = new Dm.dmsoft(); WindowHandle = 0; }