private void Form1_Load(object sender, EventArgs e) { Administrator_Authentication(); Connection_Authentication(); countryLocation = new ServerSelector(); MainUI = new DashboardDesignClass(); CountriesCmBox.SelectedIndex = 0; MainUI.DisconnectBtn_Enabled_False(); }
public void ExitMethod() { if (ConnectBtn.Enabled == false) { MessageBox.Show("Please Disconnect First", "Error at 0x168", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { VPN.Dispose(); VPN = null; MainUI = null; countryLocation = null; InfoDialog = null; GC.Collect(); Application.Exit(); } }