. NET to develop a WeChat jump Helper Program,. net to assist

Source: Internet
Author: User

. NET develops a one-hop Helper Program, which is assisted by. net.

The source code has been packaged and downloaded in the running environment.

 

Function for executing the adb command

/// <Summary> /// execute the adb command /// </summary> /// <param name = "arguments"> </param> /// <param name = "ischeck"> </param> // <returns> </returns> private string javasadb (string arguments, bool ischeck = true) {if (ischeck &&! HasAndroid) {return string. empty;} string ret = string. empty; using (Process p = new Process () {p. startInfo. fileName = Program. adbPath; // @ "C: \ Android \ sdk \ platform-tools \ adb.exe"; p. startInfo. arguments = arguments; p. startInfo. useShellExecute = false; p. startInfo. redirectStandardInput = true; // redirect standard input p. startInfo. redirectStandardOutput = true; // redirect standard output p. startInfo. redirectStandardError = true; // redirect error output p. startInfo. createNoWindow = true; p. start (); ret = p. standardOutput. readToEnd (); p. close ();} return ret ;}
Image Click Event
/// <Summary> /// black bottom position /// </summary> Point Start; /// <summary> /// specifies the center or white Point of the image. /// </summary> Point End; private void picturebox#click (object sender, EventArgs e) {var me = (System. windows. forms. mouseEventArgs) (e); if (me. button = MouseButtons. left) // press the Left button to indicate the coordinates of the Black Bottom {Start = (System. windows. forms. mouseEventArgs) (e )). location;} else if (me. button = MouseButtons. right) // Right-click the coordinates at the bottom of the black circle {End = (System. windows. forms. mouseEventArgs) (e )). location; // calculate the distance between two points. double value = Math. sqrt (Math. abs (Start. x-End. x) * Math. abs (Start. x-End. x) + Math. abs (Start. y-End. y) * Math. abs (Start. y-End. y); Text = string. format ("distance between two points: {0}, press the time: {1}", value, (3.999022243950134 * value ). toString ("0"); // 3.999022243950134 this is the best time for me to get this resolution after I have simulated it for multiple times cmdAdb (string. format ("shell input swipe 100 100 200 200 {0}", (3.999022243950134 * value ). toString ("0 ")));}}

This article is based on the guidance of the China. NET Research Association
Http://www.cnblogs.com/dotnet-org-cn
Source Code address
Https://files.cnblogs.com/files/yangxu-tech/%E8%B7%B3%E4%B8%80%E8%B7%B3%E8%BE%85%E5%8A%A9%E7%A8%8B%E5%BA%8F.zip
 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.