public void SetMenu( List<MENU_COMMAND> lst ) { foreach ( MENU_COMMAND stru in lst ) { MENU_COMMAND tru = new MENU_COMMAND(); tru.nCommand = stru.nCommand; TreeNode node = new TreeNode( stru.MenuText ); node.Tag = tru; tree.Nodes.Add( node ); } // SetTreeStyle(); }
//public object objParam = null; #region Comm Fun public static List<MENU_COMMAND> GetMenuCommandList( int nCommand, string[] strsMenuItemText, bool hasParam ) { List<MENU_COMMAND> lstMenu = new List<MENU_COMMAND>(); foreach ( string str in strsMenuItemText ) { MENU_COMMAND stru = new MENU_COMMAND() { MenuText = str, nCommand = nCommand, strParam = hasParam ? str : String.Empty, }; lstMenu.Add( stru ); } return lstMenu; }