private void DoProxyRemoved(object sender, ProxyRemovedEventHandlerArgs args) { try { this.dgProxyList.BeginInvoke(new Del7(UpdateProxyRemoved), new object[] { sender, args }); } catch (Exception) { } }
private void UpdateProxyRemoved(object sender, ProxyRemovedEventHandlerArgs args) { ProxyInfo pi = args.ProxyInfo; lock (proxiesTable) { DataRow dr; if (proxiesRows.TryGetValue(pi.ProxyAddress, out dr)) { proxiesTable.Rows.Remove(dr); proxiesRows.Remove(pi.ProxyAddress); } } }