private void btnClearPublicProxies_Click(object sender, EventArgs e) { if (MessageBox.Show("Do you really want to delete all the Proxies from Database", "Proxy", MessageBoxButtons.YesNo) == DialogResult.Yes) { clsDBQueryManager setting = new clsDBQueryManager(); setting.DeletePublicProxyData(); AddToProxysLogs("All Public Proxies Deleted from the DataBase"); workingproxiesCount = 0; lbltotalworkingproxies.Invoke(new MethodInvoker(delegate { lbltotalworkingproxies.Text = "Total Working Proxies : " + workingproxiesCount.ToString(); })); } }
private void btnClearPublicProxies_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { if (MessageBox.Show("Do you really want to delete all the Proxies from Database", "Proxy", MessageBoxButtons.YesNo) == DialogResult.Yes) { clsDBQueryManager setting = new clsDBQueryManager(); setting.DeletePublicProxyData(); AddToProxysLogs("[ " + DateTime.Now + " ] => [ All Public Proxies Deleted from the DataBase ]"); workingproxiesCount = 0; lbltotalworkingproxies.Invoke(new MethodInvoker(delegate { lbltotalworkingproxies.Text = "Total Working Proxies : " + workingproxiesCount.ToString(); })); } } catch (Exception ex) { Console.WriteLine("Error >>> " + ex.StackTrace); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddToProxysLogs("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }