Ejemplo n.º 1
0
        /// <summary>
        /// Finds the <see cref="ToolStripMenuItem"/> with the <paramref name="name"/> in the specified <paramref name="menuStripName"/>
        /// </summary>
        /// <param name="menuStripName">Name of <see cref="MenuStrip"/> to search</param>
        /// <param name="name">Name of <see cref="ToolStripMenuItem"/> to search for</param>
        /// <returns><see cref="ToolStripMenuItem"/> if found, null otherwise</returns>
        public ToolStripMenuItem FindToolStripMenuItem(string menuStripName, string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }
            var menuStrip = _Controls.GetMenuStrip(menuStripName);

            return(menuStrip.Items.FindItem(name));
        }