private void sendRatesToolStripMenuItem_Click(object sender, EventArgs e) { if (sendRates != null) { sendRates.Show(); return; } sendRates = new SendRatesWindow(); sendRates.FormClosed += SendRates_FormClosed; foreach (ConnectionRow row in connectionsRows) { sendRates?.ActiveConnections.Add(row); } sendRates.Show(); }
private void SendRates_FormClosed(object sender, FormClosedEventArgs e) { sendRates.Dispose(); sendRates = null; }