callmeyan 0aa3757b52 🆙优化bridge交互的参数;
完善web登录成功后回调插件的数据交互
2024-02-04 14:48:32 +08:00

30 lines
682 B
C#

using System;
using System.Windows.Forms;
namespace AIProofread.Controls
{
public partial class FormLogin : Form
{
public event EventHandler OnLoginCompleted;
public FormLogin()
{
InitializeComponent();
Bridge.InitWebEnvAsync("login", web);
Bridge.AddEventHandler(BridgeEvent.LoginSuccess, OnLoginSuccess);
}
private void OnLoginSuccess(object sender, EventArgs e)
{
OnLoginCompleted?.Invoke(this, e);
}
private void FormLogin_Load(object sender, EventArgs e)
{
this.web.Source = new Uri(Config.WebPath("#login"));
}
}
}