protected override void ExecuteAction(string ribbonId)
        {
            this.StartNewUndoEntry();
            PowerPointPresentation pres  = this.GetCurrentPresentation();
            PowerPointSlide        slide = this.GetCurrentSlide();
            Selection selection          = this.GetCurrentSelection();

            CustomTaskPane shapesLabPane = this.GetTaskPane(typeof(CustomShapePane));

            if (shapesLabPane == null)
            {
                this.RegisterTaskPane(typeof(CustomShapePane), ShapesLabText.TaskPanelTitle);
                shapesLabPane = this.GetTaskPane(typeof(CustomShapePane));
            }
            if (shapesLabPane == null)
            {
                return;
            }
            shapesLabPane.Visible = true;

            CustomShapePane customShapePane = shapesLabPane.Control as CustomShapePane;

            customShapePane.InitCustomShapePaneStorage();
            customShapePane.AddShapeFromSelection(selection);
        }
 public void OpenPane()
 {
     UIThreadExecutor.Execute(() =>
     {
         FunctionalTestExtensions.GetRibbonUi().OnAction(
             new RibbonControl(ShapesLabText.PaneTag));
         _pane = FunctionalTestExtensions.GetTaskPane(
             typeof(CustomShapePane)).Control as CustomShapePane;
     });
     _pane?.InitCustomShapePaneStorage();
 }
Exemplo n.º 3
0
        protected override void ExecuteAction(string ribbonId)
        {
            this.RegisterTaskPane(typeof(CustomShapePane), ShapesLabText.TaskPanelTitle);
            CustomTaskPane shapesLabPane = this.GetTaskPane(typeof(CustomShapePane));

            if (shapesLabPane == null)
            {
                return;
            }

            // toggle pane visibility
            shapesLabPane.Visible = !shapesLabPane.Visible;

            CustomShapePane customShapePane = shapesLabPane.Control as CustomShapePane;

            customShapePane.InitCustomShapePaneStorage();
        }