private void ShowProxyForm() { if (_proxyForm != null) { _proxyForm.Activate(); } else { _proxyForm = new ProxyForm(controller); _proxyForm.Show(); _proxyForm.Activate(); _proxyForm.FormClosed += proxyForm_FormClosed; } }
void proxyForm_FormClosed(object sender, FormClosedEventArgs e) { _proxyForm.Dispose(); _proxyForm = null; }