Merge pull request #1311 from GaborApatiNagy/master_CA-232294

CA-232294: Can't connect if an Add Server dialog has been cancelled before
This commit is contained in:
Mihaela Stoica 2016-11-25 15:27:24 +00:00 committed by GitHub
commit 0cdce9dfaf
2 changed files with 7 additions and 0 deletions

View File

@ -186,6 +186,7 @@ namespace XenAdmin.Dialogs
this.CancelButton = this.CancelButton2;
this.Controls.Add(this.tableLayoutPanelType);
this.Name = "AddServerDialog";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AddServerDialog_FormClosing);
this.Load += new System.EventHandler(this.AddServerDialog_Load);
this.Shown += new System.EventHandler(this.AddServerDialog_Shown);
this.groupBox1.ResumeLayout(false);

View File

@ -337,6 +337,12 @@ namespace XenAdmin.Dialogs
{
pictureBoxError.Visible = labelError.Visible = (labelError.Text != "");
}
private void AddServerDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (connection != null)
XenConnectionUI.connectionDialogs.Remove(connection);
}
}
public class CachePopulatedEventArgs : EventArgs