Beispiel #1
0
        /// <summary>
        /// Processes a GenericNode and created the menu items for it
        /// </summary>
        /// <param name="gNode">The GenericNode to evaluate</param>
        /// <returns>A collection of MenuItem objects</returns>
        private MenuItem[] DoNode(GenericNode gNode)
        {
            MenuItem[] mitems = new MenuItem[gNode.Elements.Count];

            for (int i = 0; i < mitems.Length; i++)
            {
                GenericNode node = gNode.Elements[i] as GenericNode;
                UOSound     snd  = gNode.Elements[i] as UOSound;

                if (node != null)
                {
                    mitems[i] = new MenuItem(node.Name);
                    mitems[i].MenuItems.AddRange(DoNode(node));
                }
                else if (snd != null)
                {
                    mitems[i]        = new InternalMenuItem(snd);
                    mitems[i].Click += new EventHandler(SoundData_Click);
                }
            }

            return(mitems);
        }
Beispiel #2
0
 public InternalMenuItem(UOSound snd) : base(snd.Name)
 {
     m_Sound = snd;
 }
Beispiel #3
0
			public InternalMenuItem( UOSound snd ) : base( snd.Name )
			{
				m_Sound = snd;
			}