protected override void ExecuteAction(string ribbonId)
        {
            this.StartNewUndoEntry();

            bool isButton = false;
            bool isCustom = ribbonId.Contains(EffectsLabText.BlurrinessCustom);
            int  keywordIndex;

            if (ribbonId.Contains(CommonText.DynamicMenuButtonId))
            {
                isButton     = true;
                keywordIndex = ribbonId.IndexOf(CommonText.DynamicMenuButtonId);
            }
            else
            {
                keywordIndex = ribbonId.IndexOf(CommonText.DynamicMenuOptionId);
            }

            string    feature   = ribbonId.Substring(0, keywordIndex);
            Selection selection = this.GetCurrentSelection();

            Models.PowerPointSlide slide = this.GetCurrentSlide();

            if (isButton)
            {
                EffectsLabSettings.ShowBlurSettingsDialog(feature);
                this.GetRibbonUi().RefreshRibbonControl(feature + CommonText.DynamicMenuOptionId + EffectsLabText.BlurrinessCustom);
            }
            else
            {
                int startIndex = keywordIndex + CommonText.DynamicMenuOptionId.Length;
                int percentage = isCustom ? GetCustomPercentage(feature) : int.Parse(ribbonId.Substring(startIndex, ribbonId.Length - startIndex));
                ExecuteBlurAction(feature, selection, slide, percentage);
            }
        }
Exemplo n.º 2
0
 protected override void ExecuteAction(string ribbonId)
 {
     EffectsLabSettings.ShowSpotlightSettingsDialog();
 }