Exemplo n.º 1
0
 public bool GetEnabled(Office.IRibbonControl control)
 {
     if (IsAnyWindowOpen())
     {
         ActionFramework.Common.Interface.EnabledHandler enabledHandler = EnabledHandlerFactory.CreateInstance(control.Id, control.Tag);
         return(enabledHandler.Get(control.Id));
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
        //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1

        public void RibbonLoad(Office.IRibbonUI ribbonUi)
        {
            ActionHandlerFactory         = new ActionHandlerFactory();
            EnabledHandlerFactory        = new EnabledHandlerFactory();
            LabelHandlerFactory          = new LabelHandlerFactory();
            SupertipHandlerFactory       = new SupertipHandlerFactory();
            ImageHandlerFactory          = new ImageHandlerFactory();
            ContentHandlerFactory        = new ContentHandlerFactory();
            PressedHandlerFactory        = new PressedHandlerFactory();
            CheckBoxActionHandlerFactory = new CheckBoxActionHandlerFactory();

            _ribbon = ribbonUi;

            SetVoicesFromInstalledOptions();
            SetCoreVoicesToSelections();
        }
Exemplo n.º 3
0
        public void RibbonLoad(Office.IRibbonUI ribbonUi)
        {
            ActionHandlerFactory         = new ActionHandlerFactory();
            EnabledHandlerFactory        = new EnabledHandlerFactory();
            LabelHandlerFactory          = new LabelHandlerFactory();
            SupertipHandlerFactory       = new SupertipHandlerFactory();
            ImageHandlerFactory          = new ImageHandlerFactory();
            ContentHandlerFactory        = new ContentHandlerFactory();
            PressedHandlerFactory        = new PressedHandlerFactory();
            CheckBoxActionHandlerFactory = new CheckBoxActionHandlerFactory();

            DisableFormatTab     = new Boolean();
            ShouldCompressImages = new Boolean();

            _ribbon = ribbonUi;
        }
Exemplo n.º 4
0
        public bool GetEnabled(Office.IRibbonControl control)
        {
            var enabledHandler = EnabledHandlerFactory.CreateInstance(control.Id, control.Tag);

            return(enabledHandler.Get(control.Id));
        }