diff --git a/.vs/AIProofread/v17/.suo b/.vs/AIProofread/v17/.suo index 34196cc..8e4fc1a 100644 Binary files a/.vs/AIProofread/v17/.suo and b/.vs/AIProofread/v17/.suo differ diff --git a/AIProofread/Controls/FormLogin.Designer.cs b/AIProofread/Controls/FormLogin.Designer.cs index 06f9273..11f178d 100644 --- a/AIProofread/Controls/FormLogin.Designer.cs +++ b/AIProofread/Controls/FormLogin.Designer.cs @@ -41,7 +41,7 @@ this.web.Dock = System.Windows.Forms.DockStyle.Fill; this.web.Location = new System.Drawing.Point(0, 0); this.web.Name = "web"; - this.web.Size = new System.Drawing.Size(650, 400); + this.web.Size = new System.Drawing.Size(650, 500); this.web.TabIndex = 0; this.web.ZoomFactor = 1D; // @@ -49,7 +49,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(650, 400); + this.ClientSize = new System.Drawing.Size(650, 500); this.Controls.Add(this.web); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "FormLogin"; diff --git a/AIProofread/Controls/FormLogin.cs b/AIProofread/Controls/FormLogin.cs index 2d003bd..9f8efc0 100644 --- a/AIProofread/Controls/FormLogin.cs +++ b/AIProofread/Controls/FormLogin.cs @@ -14,6 +14,19 @@ namespace AIProofread.Controls public FormLogin() { InitializeComponent(); + this.FormClosed += (s, e) => + { + // 关闭时释放资源 + try + { + if (web != null) + { + web.Dispose(); + web = null; + } + } + catch { }; + }; //Bridge.InitWebEnvAsync("login", web); //Bridge.AddEventHandler(BridgeEvent.LoginSuccess, OnLoginSuccess); } @@ -21,6 +34,19 @@ namespace AIProofread.Controls { this.action = action; InitializeComponent(); + this.FormClosed += (s, e) => + { + // 关闭时释放资源 + try + { + if (web != null) + { + web.Dispose(); + web = null; + } + } + catch { }; + }; } private void OnLoginSuccess(object sender, EventArgs e)