52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace PcLogger
|
|
{
|
|
/// <summary>
|
|
/// 阿里妈妈扫码协议登录验证码
|
|
/// </summary>
|
|
public partial class smsCode : Form
|
|
{
|
|
public string sms { get; set; }
|
|
public smsCode()
|
|
{
|
|
InitializeComponent();
|
|
sms = "";
|
|
}
|
|
|
|
/// <summary>
|
|
/// 提交验证码
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
var temp = textBox1.Text;
|
|
Regex regex = new Regex(@"^\d{6}$", RegexOptions.ECMAScript);
|
|
if (regex.IsMatch(temp))
|
|
{
|
|
sms = textBox1.Text;
|
|
this.DialogResult = DialogResult.OK;
|
|
}
|
|
else
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
private void smsCode_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|