コード例 #1
0
        /// <summary>
        /// Adds a text menu item.
        /// </summary>
        /// <param name="name">The name for the instance.</param>
        /// <param name="text">The text to show on the instance.</param>
        /// <returns>The text menu item.</returns>
        public MenuItemText AddMenuItemText(string name, string text)
        {
            var item = new MenuItemText(name)
            {
                ConfigText = text
            };

            this.AddControl(item);
            this.MustRedraw = true;

            return(item);
        }
コード例 #2
0
ファイル: MenuContainer.cs プロジェクト: xxy1991/cozy
        /// <summary>
        /// Adds a text menu item.
        /// </summary>
        /// <param name="name">The name for the instance.</param>
        /// <param name="text">The text to show on the instance.</param>
        /// <returns>The text menu item.</returns>
        public MenuItemText AddMenuItemText(string name, string text)
        {
            var item = new MenuItemText(name)
                           {
                               ConfigText = text
                           };

            this.AddControl(item);
            this.MustRedraw = true;

            return item;
        }