private void InitControl( Control ctrl ) { if (ctrl is TextBox) { SetTextBoxDelegate( ctrl ); } else if (ctrl is ATMLControl) { ( (ATMLControl) ctrl ).InitControls(); } else { foreach (Control ctrl1 in ctrl.Controls) { InitControl( ctrl1 ); } } }