old_flsystem/类库/Chat.Framework/QQSdk/QPlus/FormSlide.cs

66 lines
1.6 KiB
C#
Raw Normal View History

2022-09-20 03:10:29 +00:00
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;
}
}
}