private void btnCert_Click(object sender, EventArgs e) { var c = MainForm.Conf.SSLEnabled; var ssl = new SSLConfig(); ssl.ShowDialog(this); ssl.Dispose(); SetSSLText(); if (MainForm.Conf.SSLEnabled != c) { MainClass.ConnectServices(false); } }