private void performStart() { // show site login form SiteLoginForm = new LoginForm(); SiteLoginForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; if (SiteLoginForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { // after user entered a site url and user credentials, the main form shows through Form_Load populateMainForm(); } else { // user exited/canceled the login form PerformExit(); } }
private void PerformExit() { // dispose objects de = null; SiteLoginForm = null; FileDownloadForm = null; myAboutForm = null; Application.Exit(); }