Inheritance: ToolbarItem
        /// <summary>
        ///
        /// </summary>
        public ToolbarTextItem.Builder ToolbarTextItem(ToolbarTextItem component)
        {
#if MVC
            component.ViewContext = this.HtmlHelper != null ? this.HtmlHelper.ViewContext : null;
#endif
            return(new ToolbarTextItem.Builder(component));
        }
        public override void ModifyTree(TreePanel treePanel, IMainInterface mainInterface)
        {
            if (!Context.Current.Resolve<GlobalizationSection>().Enabled)
                return;

            // Setup tree bottom toolbar.
            Toolbar bottomToolbar = new Toolbar();
            treePanel.BottomBar.Add(bottomToolbar);

            ToolbarTextItem textItem = new ToolbarTextItem { Text = "Language: " };
            bottomToolbar.Items.Add(textItem);

            IconCombo comboBox = new IconCombo
            {
                EmptyText = "Select...",
                Width = Unit.Pixel(100),
                Editable = false
            };
            comboBox.Listeners.Select.Handler = string.Format(@"
                Ext.net.DirectMethods.LanguageChooser.ChangeLanguage(record.get('value'),
                {{
                    url: '{0}',
                    success: function(result)
                    {{
                        stbStatusBar.setStatus({{ text: 'Changed language', iconCls: '', clear: true }});
                    }}
                }});",
                Context.AdminManager.GetAdminDefaultUrl());

            foreach (Language language in Context.Current.Resolve<ILanguageManager>().GetAvailableLanguages())
            {
                IconComboListItem listItem = new IconComboListItem(language.Title, language.Name, language.IconUrl);
                comboBox.Items.Add(listItem);
                if (language.Name == Context.AdminManager.CurrentAdminLanguageBranch)
                {
                    comboBox.SelectedItem.Text = listItem.Text;
                    comboBox.SelectedItem.Value = listItem.Value;
                }
            }

            bottomToolbar.Items.Add(comboBox);
        }
 /// <summary>
 ///
 /// </summary>
 public ToolbarTextItem.Builder ToolbarTextItem(ToolbarTextItem component)
 {
     return(new ToolbarTextItem.Builder(component));
 }