66 lines
1.6 KiB
C#
66 lines
1.6 KiB
C#
|
using Robot.Framework.Packets;
|
|||
|
using Robot.Framework.Utils;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.IO;
|
|||
|
using System.Linq;
|
|||
|
using System.Runtime.InteropServices;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
using UI.Framework.Forms;
|
|||
|
|
|||
|
namespace Chat.Framework.QQSdk.QPlus
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// QQ滑动验证码窗体
|
|||
|
/// </summary>
|
|||
|
[ComVisible(true)]
|
|||
|
public partial class FormSlide : Form
|
|||
|
{
|
|||
|
public FormSlide()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
private void FormSlide_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
webBrowser1.ObjectForScripting = this;
|
|||
|
webBrowser1.Navigate(captchaURL);
|
|||
|
}
|
|||
|
|
|||
|
public QQCaptchaResponse resp { get; set; }
|
|||
|
public FormSlide(string captchaURL)
|
|||
|
{
|
|||
|
this.captchaURL = captchaURL;
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
string captchaURL = null;
|
|||
|
|
|||
|
public bool NotifyStartEditContent(string e = "")
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
if (!string.IsNullOrWhiteSpace(e))
|
|||
|
{
|
|||
|
resp = JSON.Deserialize<QQCaptchaResponse>(e);
|
|||
|
if (resp != null)
|
|||
|
{
|
|||
|
this.DialogResult = DialogResult.OK;
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
LogHelper.GetSingleObj().Error("QQ验证码异常", ex.Message);
|
|||
|
}
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|