Esempio n. 1
0
        private void LoadByMetroToolbar(MetroShell rc)
        {
            // Loop through all RibbonBars and add the items
            List<IOwner> toolbars = rc.RegisteredToolbars;
            foreach (IOwner owner in toolbars)
            {
                if (owner is MetroToolbar)
                {
                    LoadByMetroToolbar((MetroToolbar)owner);
                }
            }

            BaseItem startButton = rc.GetApplicationButton();
            if (startButton != null)
            {
                LoadByRibbonBar(startButton, GetMetroToolbarCategory(startButton.Text));
            }
        }
Esempio n. 2
0
        private void LoadQatItems(MetroShell tab)
        {
            int count = tab.QuickToolbarItems.Count;
            int start = 0;

            BaseItem startButton = tab.GetApplicationButton();
            if (startButton != null)
                start = tab.QuickToolbarItems.IndexOf(startButton) + 1;

            for (int i = start; i < count; i++)
            {
                BaseItem item = tab.QuickToolbarItems[i];
                if (IsSystemItem(item))
                    continue;
                BaseItem custItem = GetCustomizeRepresentation(item);
                custItem.Tag = null;
                if (!item.CanCustomize) custItem.Visible = false;
                itemPanelQat.Items.Add(custItem);
            }
        }
Esempio n. 3
0
        private void LoadByCategory(MetroShell tab)
        {
            // Loop through all RibbonBars and add the items
            List<IOwner> toolbars = tab.RegisteredToolbars;
            foreach (IOwner toolbar in toolbars)
            {
                if (toolbar is MetroToolbar)
                    LoadByCategory((MetroToolbar)toolbar);
            }

            BaseItem startButton = tab.GetApplicationButton();
            if (startButton != null)
            {
                LoadByCategory(startButton);
            }
        }