Exemple #1
0
        private void galleryAlign_ButtonClick(object sender, RibbonControlEventArgs e)
        {
            try
            {
                PowerPoint.Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
                TopOrLeft            topLeft;

                if (e.Control.Id == buttonAlignLeftToRight.Id)
                {
                    topLeft = TopOrLeft.Left;
                }
                else if (e.Control.Id == buttonAlignTopToBottom.Id)
                {
                    topLeft = TopOrLeft.Top;
                }
                else
                {
                    return;
                }

                ToolsSizeAndPosition.AlignTopToBottom(selection, topLeft);
            }
            catch (Exception ex)
            {
                Exceptions.Handle(ex);
            }
        }
Exemple #2
0
 private void btnSplitShape_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
         ToolsSizeAndPosition.SplitObject(selection);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }
Exemple #3
0
 private void buttonSameHeightOrWidth_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Selection selection     = Globals.ThisAddIn.Application.ActiveWindow.Selection;
         HeightOrWidth        heightOrWidth = e.Control.Id == btnSameHeight.Id ? HeightOrWidth.Height : HeightOrWidth.Width;
         ToolsSizeAndPosition.SameHeightOrWidth(selection, heightOrWidth);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }