private void frmGoogleSearch_FormClosed(object sender, FormClosedEventArgs e) { BimtProxyService.ShutDown(); Application.Exit(); //app.ShutDown(); //BimtProxyService.ShutDown(); Process p = GetProcess("Shadowsocks"); if (p != null) { p.Kill(); } }
public frmGoogleSearch(IShutDownable i) { try { InitializeComponent(); app = i; } catch (Exception) { BimtProxyService.ShutDown(); MessageBox.Show(null, "代理初始化失败!", "代理设置"); } }
private void button2_Click(object sender, EventArgs e) { MessageBox.Show(null, "代理已停止!", "Setting"); BimtProxyService.ShutDown(); this.FindForm().Close(); }