protected void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).OnAction(() => MessageBox.Show(@"More..."));

            cmds.AddToggleButtonCommand(ToggleButtonId).OnPressed(isPressed => {
                MessageBox.Show(isPressed
                    ? @"Toggle button pressed"
                    : @"Toggle button NOT pressed");
            });

            cmds.AddDropDownCommand(BookmarksDropDownId)
            .GetItemCount(_content.Count)
            .GetItemId(i => _content.Ids(i))
            .GetItemLabel(i => _content.Labels(i))
            .GetItemImage(i => _content.Images(i))
            .GetItemSupertip(_content.SuperTips)
            .OnItemAction(index => { MessageBox.Show(@"Your selection:" + (index + 1)); });

            cmds.AddComboBoxCommand(BookmarksComboId)
            .GetItemCount(_content.Count)
            .GetItemId(i => _content.Ids(i))
            .GetItemLabel(i => _content.Labels(i))
            .GetItemSupertip(_content.SuperTips)
            .GetText(() => "Text")
            .OnChange((value) => MessageBox.Show(@"Your selection:" + value));
        }
Exemple #2
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).Action(() => MessageBox.Show(@"More..."));

            cmds.AddToggleButtonCommand(ToggleButtonId)
            .Action(isPressed =>
            {
                MessageBox.Show(isPressed
                        ? @"Toggle button pressed"
                        : @"Toggle button NOT pressed");
            }).Pressed(() => true);

            cmds.AddDropDownCommand(BookmarksDropDownId)
            .ItemCounts(content.Count)
            .ItemsId(content.Ids)
            .ItemsLabel(content.Labels)
            .ItemsImage(() => content.Images())
            .ItemsSupertip(content.SuperTips)
            .Action(index =>
            {
                MessageBox.Show(@"Your selection:" + (index + 1));
            });

            cmds.AddComboBoxCommand(BookmarksComboId)
            .ItemCounts(content.Count)
            .ItemsId(content.Ids)
            .ItemsLabel(content.Labels)
            .ItemsSupertip(content.SuperTips)
            .GetText(() => "Text")
            .OnChange((value) => MessageBox.Show(@"Your selection:" + value));
        }
Exemple #3
0
 public override void OnBeginShutdown(ref Array custom)
 {
     OnClosing();
     cmds          = null;
     ribbonBuilder = null;
     base.OnBeginShutdown(ref custom);
 }
Exemple #4
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).Action(() => MessageBox.Show(@"More..."));

            cmds.AddToggleButtonCommand(ToggleButtonId)
                .Action(isPressed =>
                {
                    MessageBox.Show(isPressed 
                        ? @"Toggle button pressed" 
                        : @"Toggle button NOT pressed");
                }).Pressed(() => true);

            cmds.AddDropDownCommand(BookmarksDropDownId)
                .ItemCounts(content.Count)
                .ItemsId(content.Ids)
                .ItemsLabel(content.Labels)
                .ItemsImage(() => content.Images())
                .ItemsSupertip(content.SuperTips)
                .Action(index =>
                { 
                    MessageBox.Show(@"Your selection:" + (index+1));
                });

            cmds.AddComboBoxCommand(BookmarksComboId)
                .ItemCounts(content.Count)
                .ItemsId(content.Ids)
                .ItemsLabel(content.Labels)
                .ItemsSupertip(content.SuperTips)
                .GetText(() => "Text")
                .OnChange((value) => MessageBox.Show(@"Your selection:" + value));
        }
Exemple #5
0
 public override void OnBeginShutdown(ref Array custom)
 {
     OnClosing();
     cmds = null;
     ribbonBuilder = null;
     base.OnBeginShutdown(ref custom);
 }
Exemple #6
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand("TestCmd")
            .Action(() => AddinContext.MainController.Sample.ShowMessage());

            cmds.AddButtonCommand("TableCmd")
            .Action(() => AddinContext.MainController.Report.CreateTable());
        }
Exemple #7
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand("Button1").Action(
                () => MessageBox.Show("Button 1 clicked"));

            cmds.AddButtonCommand("Button2").Action(
                () => MessageBox.Show("Button 2 clicked"));
        }
Exemple #8
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand("Button1").Action(
                    () => MessageBox.Show("Button 1 clicked"));

            cmds.AddButtonCommand("Button2").Action(
                    () => MessageBox.Show("Button 2 clicked"));
        }
Exemple #9
0
 protected override void CreateRibbonCommand(IRibbonCommands cmds)
 {
     cmds.AddButtonCommand(PortfolioAnalyzerBtn).IsEnabled(() => AddinContext.ExcelApp.Worksheets.Count() > 1)
         .Action(() => MessageBox.Show("Analyzer button clicked"));
     cmds.AddButtonCommand(PortfolioContributorBtn)
         .Action(() => MessageBox.Show("Portfolio contributors button clicked"));
     cmds.AddButtonCommand(PortfolioAllocationBtn)
         .Action(() => MessageBox.Show("Portfolio allocation button clicked"));
     cmds.AddBoxCommand(ReportingBox).IsVisible(() => AddinContext.ExcelApp.Worksheets.Count() > 1);
 }
 protected void CreateRibbonCommand(IRibbonCommands cmds)
 {
     cmds.AddButtonCommand(PortfolioAnalyzerBtn).GetEnabled(() => AddinContext.ExcelApp.Worksheets.Count() > 1)
     .OnAction(() => MessageBox.Show("Analyzer button clicked"));
     cmds.AddButtonCommand(PortfolioContributorBtn)
     .OnAction(() => MessageBox.Show("Portfolio contributors button clicked"));
     cmds.AddButtonCommand(PortfolioAllocationBtn)
     .OnAction(() => MessageBox.Show("Portfolio allocation button clicked"));
     cmds.AddBoxCommand(ReportingBox).GetVisible(() => AddinContext.ExcelApp.Worksheets.Count() > 1);
 }
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand("button1")
            .Action(() => ExcelAddin.CoolFunction("Add one more sheet"));
            // Reporting Group
            //cmds.AddButtonCommand("button3")
            //    .IsEnabled(() => AddinContext.ExcelApp.Worksheets.Count > 2);


            //cmds.AddBoxCommand("ReportingBox")
            //    .IsVisible(() => AddinContext.ExcelApp.Worksheets.Count > 1);
        }
Exemple #12
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(HappyButtonId).Action(() => MessageBox.Show("Be Happy !!!"));
            

            cmds.AddLabelCommand(OutputText).GetLabel(()=> resultText);
            cmds.AddEditBoxCommand(InputText).OnChange((a) =>
            {
                resultText = a;
                Ribbon.InvalidateControl(OutputText);
            })
            .GetText(() => "Hello");
            cmds.AddDialogBoxLauncherCommand(BoxLauncherId)
                .Action(() => MessageBox.Show("Dialog Box clicked"));
        }
Exemple #13
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(HappyButtonId).Action(() => MessageBox.Show("Be Happy !!!"));


            cmds.AddLabelCommand(OutputText).GetLabel(() => resultText);
            cmds.AddEditBoxCommand(InputText).OnChange((a) =>
            {
                resultText = a;
                Ribbon.InvalidateControl(OutputText);
            })
            .GetText(() => "Hello");
            cmds.AddDialogBoxLauncherCommand(BoxLauncherId)
            .Action(() => MessageBox.Show("Dialog Box clicked"));
        }
Exemple #14
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand("btnImportIC")
            .IsEnabled(() => AddinContext.ExcelApp.Worksheets.Count() > 2)
            .Action(() => AddinContext.MainController.ImportInterchangeData().Wait());
            cmds.AddButtonCommand("btnMap")
            .IsEnabled(() => AddinContext.ExcelApp.Worksheets.Any()).IsVisible(() => true)
            .Action(() => AddinContext.MainController.Sample.OpenForm());
            cmds.AddButtonCommand("btnZenrinICExportSql")
            .IsEnabled(() => AddinContext.ExcelApp.Worksheets.Any()).IsVisible(() => true)
            .Action(() => AddinContext.MainController.ExportInterchangeAsMergeSql().Wait());
            cmds.AddButtonCommand("btnParseIndustrialStackingList")
            .IsEnabled(() => AddinContext.ExcelApp.Worksheets.Any()).IsVisible(() => true)
            .Action(() => AddinContext.MainController.ParseIndustrialStackingList().Wait());
            //cmds.AddButtonCommand("TestCmd")
            //    .Action(() => AddinContext.MainController.Sample.ShowMessage());

            //cmds.AddButtonCommand("TableCmd")
            //    .Action(() => AddinContext.MainController.Report.CreateTable());
        }
Exemple #15
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).Action(() => MessageBox.Show(@"More..."));
            cmds.AddButtonCommand(HappyButtonId).Action(() => MessageBox.Show("Be Happy !!!"));

            cmds.AddCheckBoxCommand(ShowNumberId).Action(isPressed =>
            {
                checkboxPressed = isPressed;
                Ribbon.InvalidateControl(DynamicGalleryId);
                MessageBox.Show(isPressed ? "Show number pressed" : "Show number NOT pressed");
            });

            cmds.AddGalleryCommand(GalleryId).Action(position =>
            {
                switch (position)
                {
                case 0:
                    MessageBox.Show("Option: Show number Clicked");
                    return;

                case 1:
                    MessageBox.Show("Option: Be Happy !!!");
                    return;
                }
            });

            cmds.AddGalleryCommand(DynamicGalleryId)
            .IsEnabled(() => checkboxPressed)
            .ItemCounts(content.Count)
            .ItemsId(content.Ids)
            .ItemsLabel(content.Labels)
            .ItemsImage(() => content.Images())
            .ItemsSupertip(content.SuperTips)
            .ItemSelectionIndex(() => GallerySelectedIndex)
            .Action(i =>
            {
                GallerySelectedIndex = i;
                MessageBox.Show(@"Your selection: " + (i + 1));
            });
        }
Exemple #16
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).Action(() => MessageBox.Show(@"More..."));
            cmds.AddButtonCommand(HappyButtonId).Action(() => MessageBox.Show("Be Happy !!!"));

            cmds.AddCheckBoxCommand(ShowNumberId).Action(isPressed =>
            {
                checkboxPressed = isPressed;
                Ribbon.InvalidateControl(DynamicGalleryId);
                MessageBox.Show(isPressed ? "Show number pressed" : "Show number NOT pressed");
            });

            cmds.AddGalleryCommand(GalleryId).Action(position =>
            {
                switch (position)
                {
                    case 0:
                        MessageBox.Show("Option: Show number Clicked");
                        return;
                    case 1:
                        MessageBox.Show("Option: Be Happy !!!");
                        return;
                }
            });

            cmds.AddGalleryCommand(DynamicGalleryId)
                .IsEnabled(()=>checkboxPressed)
                .ItemCounts(content.Count)
                .ItemsId(content.Ids)
                .ItemsLabel(content.Labels)
                .ItemsImage(() => content.Images())
                .ItemsSupertip(content.SuperTips)
                .ItemSelectionIndex(() => GallerySelectedIndex)
                .Action(i =>
                {
                    GallerySelectedIndex = i;
                    MessageBox.Show(@"Your selection: " + (i+1));
                });
        }
Exemple #17
0
 protected override void CreateRibbonCommand(IRibbonCommands cmds)
 {
     cmds.AddButtonCommand("MeetingIdCmd")
     .IsEnabled(() => AddinContext.ExcelApp.Worksheets.Any()).IsVisible(() => true)
     .Action(() => AddinContext.MainController.Sample.OpenForm());
 }
Exemple #18
0
 protected abstract void CreateRibbonCommand(IRibbonCommands cmds);
Exemple #19
0
 protected RibbonFluent()
 {
     this.cmds     = new RibbonCommands();
     ribbonBuilder = new RibbonBuilder();
 }
Exemple #20
0
 protected RibbonFluent()
 {
     this.cmds = new RibbonCommands();
     ribbonBuilder = new RibbonBuilder();
 }
Exemple #21
0
 protected abstract void CreateRibbonCommand(IRibbonCommands cmds);