37 lines
953 B
C#
37 lines
953 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace AIProofread.Controls
|
|
{
|
|
public partial class FormLogin : BaseWinForm
|
|
{
|
|
|
|
public event EventHandler OnLoginCompleted;
|
|
private string action = "default";
|
|
public FormLogin()
|
|
{
|
|
InitializeComponent();
|
|
//Bridge.InitWebEnvAsync("login", web);
|
|
//Bridge.AddEventHandler(BridgeEvent.LoginSuccess, OnLoginSuccess);
|
|
}
|
|
public FormLogin(string action)
|
|
{
|
|
this.action = action;
|
|
InitializeComponent();
|
|
}
|
|
|
|
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"));
|
|
InitWebView(web, Config.WebPath("login?action=" + this.action), "login");
|
|
}
|
|
|
|
|
|
}
|
|
}
|