public void RemoveFingerprintEvent(System.Windows.Forms.Control.ControlCollection Controls) { Controls.Remove(m_zkFprint); m_currentOnCapture = null; m_currentOnImageReceived = null; m_currentOnFeatureInfo = null; m_currentOnEnroll = null; m_zkFprint.CancelCapture(); m_zkFprint.CancelEnroll(); }
private static bool RemoveChildByName(this Control.ControlCollection collection, string name) { foreach (Control child in collection) { if (child.Name == name) { collection.Remove(child); return(true); } // iterate children if (RemoveChildByName(child.Controls, name)) { return(true); } } return(false); }