Пример #1
0
        protected override void CreateFluentRibbon(IRibbonBuilder builder)
        {
            builder.CustomUi.AddNamespace("acme", "acme.addin.sync").Ribbon.Tabs(c => {
                c.AddTab("My Tab").IdQ("acme", MyTabId)
                .Groups(g => {
                    g.AddGroup("Data").IdQ("acme", DataGroupId)
                    .Items(d => {
                        d.AddButton("My Save").IdMso("FileSave").NormalSize().ImageMso("FileSave")
                        .Callback((IButtonCommand)_commands.Find("FileSave"));
                        d.AddButton("Button").Id("buttonOne");
                        d.AddComboBox("numbers")
                        .Id(BookmarksComboId)
                        .ShowLabel().NoImage()
                        .DynamicItems()
                        .Callback((IComboBoxCommand)_commands.Find("numbers"));

                        d.AddDropDown("With Image")
                        .Id(BookmarksDropDownId)
                        .ShowLabel().NoImage()
                        .ShowItemLabel().ShowItemImage().DynamicItems()
                        .Buttons(b => b.AddButton("Button...").Id(ButtonMore))
                        .Callback((IDropDownCommand)_commands.Find(BookmarksDropDownId));

                        d.AddToggleButton("Toggle Button")
                        .Id(ToggleButtonId)
                        .Callback((IToggleButtonCommand)_commands.Find(ToggleButtonId));
                    });
                });
            });
        }
Пример #2
0
        protected override void CreateFluentRibbon(IRibbonBuilder builder)
        {
            builder.CustomUi.Ribbon.Tabs(c =>
            {
                c.AddTab("My Tab").Id(MyTabId)
                .Groups(g =>
                {
                    g.AddGroup("Data").Id(DataGroupId)
                    .Items(d =>
                    {
                        d.AddEditbox("input Text").Id(InputText)
                        .ImagePath("option").MaxLength(7)
                        .SizeString(7)
                        .Callback((IEditBoxCommand)commands.Find(InputText));

                        d.AddLabelControl().Id(OutputText)
                        .Callback((ILabelCommand)commands.Find(OutputText));

                        d.AddButton("Happy")
                        .Id(HappyButtonId)
                        .LargeSize()
                        .ImageMso("HappyFace")
                        .Callback((IButtonCommand)commands.Find(HappyButtonId));
                    })
                    .DialogBoxLauncher(i => i.AddDialogBoxLauncher().Id(BoxLauncherId).Supertip("Box launcher"));
                });
            });
        }
Пример #3
0
        protected override void CreateFluentRibbon(IRibbonBuilder builder)
        {
            builder.CustomUi.Ribbon.Tabs(c => {
                c.AddTab("My Tab").Id(MyTabId)
                .Groups(g => {
                    g.AddGroup("Data").Id(DataGroupId)
                    .Items(d => {
                        d.AddMenu("Option").Id(OptionId).ShowLabel()
                        .ImageMso("FileNew").LargeSize()
                        .ItemLargeSize().Items(
                            v => {
                            v.AddCheckbox("Show numbers").Id(ShowNumberId)
                            .Callback((ICheckBoxCommand)_commands.Find(ShowNumberId));

                            v.AddSeparator().SetTitle("Mood");
                            v.AddButton("Happy")
                            .Id(HappyButtonId)
                            .ImageMso("HappyFace");

                            v.AddGallery("Dynamic Option").Id(DynamicGalleryId)
                            .ShowLabel().NoImage().ShowItemLabel().ShowItemImage()
                            //.DynamicItems()
                            //.Buttons(b => b.AddButton("Button...").Id(ButtonMore))
                            .NumberRows(6).NumberColumns(1)
                            .Callback((IGalleryCommand)_commands.Find(DynamicGalleryId));
                        });

                        d.AddGallery("Multi Option").Id(GalleryId)
                        .ShowLabel().LargeSize().NoImage().ShowItemLabel().ShowItemImage()
                        .Items(v => {
                            v.AddItem("Show numbers").Id(ShowNumberId2);
                            v.AddItem("Happy").Id(HappyButtonId2).ImageMso("HappyFace");
                        }).Callback((IGalleryCommand)_commands.Find(GalleryId));
                    });
                });
            });
        }
Пример #4
0
        protected override void CreateFluentRibbon(IRibbonBuilder builder)
        {
            builder.CustomUi.AddNamespace("acme", "acme.addin.sync").Ribbon.Tabs(c => {
                c.AddTab("My Tab").IdQ("acme", MyTabId)
                .Groups(g => {
                    g.AddGroup("Data").IdQ("acme", DataGroupId)
                    .Items(d => {
                        d.AddButton("Allocation")
                        .Id(PortfolioAllocationBtn)
                        .LargeSize()
                        .ImageMso("HappyFace")
                        .Callback((IButtonCommand)_commands.Find(PortfolioAllocationBtn));

                        d.AddBox().Id(ReportingBox)
                        .HorizontalDisplay().Items(i => {
                            i.AddButton("Performance")
                            .Id(PortfolioPerformanceBtn)
                            .NormalSize()
                            .ImageMso("HappyFace")
                            .Callback((IButtonCommand)_commands.Find(PortfolioPerformanceBtn));

                            i.AddButton("Contributor").Id(PortfolioContributorBtn)
                            .NormalSize().NoImage().ShowLabel()
                            .Supertip("Portfolio best contributor")
                            .Screentip("Display the top / bottom X contributor to the portfolio performance.")
                            .Callback((IButtonCommand)_commands.Find(PortfolioContributorBtn));
                        }).Callback((IBoxCommand)_commands.Find(ReportingBox));
                    });
                    g.AddGroup("Analytic").Id(AnalyticsGroup)
                    .Items(i => i.AddButton("Portfolio Analysis").Id(PortfolioAnalyzerBtn).NormalSize()
                           .NoImage().ShowLabel()
                           .Callback((IButtonCommand)_commands.Find(PortfolioAnalyzerBtn))
                           );
                });
            });
        }