private void ButtonUpdatePictures_Click(object sender, RibbonControlEventArgs e) { dynamic keep = Globals.ThisAddIn.Application.Selection; try { ChemPictureTool.UpdatePictures(CreatePictureGegerator()); } catch (Exception) { } finally { if (keep != null) { try { keep.Select(); } catch (Exception) { } } } }
public void Run() { ChemPictureTool.AddChemicalStructures(range, pictureGenerator, (Action)AddChemicalStructuresCheckCancel); }
private void ButtonShowPictures_Click(object sender, RibbonControlEventArgs e) { ChemPictureTool.SetChemicalStructureVisible(true); }