Пример #1
0
        public MainRibbon()
        {
            // Sourcemap
            sourcemap = new RibbonMenuItem("SourceMap", this);

            RibbonGroup group = new RibbonGroup("Loading", this);
            Button button = new Button("Load Sourcemap", this);
            button.Selected += new Button.ButtonSelectedEvent(LoadMapEvent);

            Button button2 = new Button("Unload Sourcemap", this);
            button2.Selected += new Button.ButtonSelectedEvent(UnLoadMapEvent);
            group.AddControl(button);
            group.AddControl(button2);
            sourcemap.AddItem(group);

            group = new RibbonGroup("Hags?",this);
            group.AddControl(new Button("Magic Button", this));
            sourcemap.AddItem(group);

            AddItem(sourcemap);

            // Renderer
            renderer = new RibbonMenuItem("Renderer", this);
            group = new RibbonGroup("Screenshot",this);
            button = new Button("Screenshot", this);
            group.AddControl(button);
            renderer.AddItem(group);
            AddItem(renderer);

            // Other
            AddItem(new RibbonMenuItem("Test2", this));
            AddItem(new RibbonMenuItem("Test3", this));
        }
Пример #2
0
 public void AddItem(RibbonGroup item)
 {
     Items.Add(item);
     panel.AddControl(item);
     //panel.DoLayout();
 }