From: Argiris K. <be...@us...> - 2005-12-09 01:25:21
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28740/Core Modified Files: Tag: STABLE MagicAjaxModule.cs Util.cs Log Message: Copied changes from HEAD. Index: Util.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Util.cs,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** Util.cs 4 Dec 2005 03:25:15 -0000 1.13 --- Util.cs 9 Dec 2005 01:25:06 -0000 1.13.2.1 *************** *** 138,142 **** } ! public static ArrayList GetChildControlsOfType (Control parentControl, Type type, bool onlyVisible) { ArrayList list = new ArrayList(); --- 138,150 ---- } ! /// <summary> ! /// Gets all child controls of a specific type. ! /// </summary> ! /// <param name="parentControl">Control to search</param> ! /// <param name="searchType">The type to search for</param> ! /// <param name="notRecursiveType">If not null, the child controls of this type are not searched</param> ! /// <param name="onlyVisible">if true gets only the visible controls</param> ! /// <returns></returns> ! public static ArrayList GetChildControlsOfType (Control parentControl, Type searchType, Type notRecursiveType, bool onlyVisible) { ArrayList list = new ArrayList(); *************** *** 148,155 **** continue; ! if ( type.IsInstanceOfType(con) ) list.Add (con); ! list.AddRange (GetChildControlsOfType(con, type, onlyVisible)); } --- 156,164 ---- continue; ! if ( searchType.IsInstanceOfType(con) ) list.Add (con); ! if ( notRecursiveType == null || !notRecursiveType.IsInstanceOfType(con) ) ! list.AddRange (GetChildControlsOfType(con, searchType, notRecursiveType, onlyVisible)); } Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.38 retrieving revision 1.38.2.1 diff -C2 -d -r1.38 -r1.38.2.1 *** MagicAjaxModule.cs 2 Dec 2005 08:25:10 -0000 1.38 --- MagicAjaxModule.cs 9 Dec 2005 01:25:06 -0000 1.38.2.1 *************** *** 576,580 **** { // Restore the validators ! ArrayList validators = Util.GetChildControlsOfType(_magicAjaxContext.StoredPageInfo.Page, typeof(IValidator), false); foreach (IValidator valid in validators) _magicAjaxContext.StoredPageInfo.Page.Validators.Add(valid); --- 576,580 ---- { // Restore the validators ! ArrayList validators = Util.GetChildControlsOfType(_magicAjaxContext.StoredPageInfo.Page, typeof(IValidator), null, false); foreach (IValidator valid in validators) _magicAjaxContext.StoredPageInfo.Page.Validators.Add(valid); |