private void editBoxGoToSlide_TextChanged(object sender, RibbonControlEventArgs e) { try { PowerPoint.View view = Globals.ThisAddIn.Application.ActiveWindow.View; string slideNumberString = editBoxGoToSlide.Text; ToolsSelection.GoToSlide(view, slideNumberString); editBoxGoToSlide.Text = ""; } catch (Exception ex) { Exceptions.Handle(ex); } }
private void gallerySelectSimilar_ButtonClick(object sender, RibbonControlEventArgs e) { try { PowerPoint.Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection; SelectSimilarTypes selectType; if (e.Control.Id == buttonSelectSimilarColorLine.Id) { selectType = SelectSimilarTypes.SelectSimilarColorLine; } else if (e.Control.Id == buttonSelectSimilarColor.Id) { selectType = SelectSimilarTypes.SelectSimilarColor; } else if (e.Control.Id == buttonSelectSimilarLine.Id) { selectType = SelectSimilarTypes.SelectSimilarLine; } else if (e.Control.Id == buttonSelectSimilarHeight.Id) { selectType = SelectSimilarTypes.SelectSimilarHeight; } else if (e.Control.Id == buttonSelectSimilarWidth.Id) { selectType = SelectSimilarTypes.SelectSimilarWidth; } else if (e.Control.Id == buttonSelectSimilarHorizontal.Id) { selectType = SelectSimilarTypes.SelectSimilarHorizontal; } else if (e.Control.Id == buttonSelectSimilarVertical.Id) { selectType = SelectSimilarTypes.SelectSimilarVertical; } else { return; } ToolsSelection.SelectSimilar(selection, selectType); } catch (Exception ex) { Exceptions.Handle(ex); } }