private void AddWebsiteForm_FormClosed(object sender, FormClosedEventArgs e) { if (form != null) { form.Dispose(); form = null; } }
public static AddWebsiteForm GetInstance() { if (form == null) { lock (synLock) { form = new AddWebsiteForm(); } } return(form); }
public static AddWebsiteForm GetInstance() { if (form == null) { lock (synLock) { form = new AddWebsiteForm(); } } return form; }
private void BtnAddWebsite_Click(object sender, EventArgs e) { try { form_AddWebsite = AddWebsiteForm.GetInstance(); form_AddWebsite.AddWebsiteHandlor += new AddWebsiteForm.AddWebsiteHandler(AddWebsite); form_AddWebsite.ShowDialog(); form_AddWebsite.Activate(); BtnApply.Enabled = true; } catch (Exception ex) { log.WriteLog(ex.ToString()); } }
private void BtnAddWebsite_Click(object sender, EventArgs e) { try { form_AddWebsite = AddWebsiteForm.GetInstance(); form_AddWebsite.AddWebsiteHandlor +=new AddWebsiteForm.AddWebsiteHandler(AddWebsite); form_AddWebsite.ShowDialog(); form_AddWebsite.Activate(); BtnApply.Enabled = true; } catch (Exception ex) { log.WriteLog(ex.ToString()); } }