private void RegisterExcelAppClosedEvent(Excel.Application app) { app.WorkbookBeforeClose += (Excel.Workbook wb, ref bool cancel) => AppClosedEvent?.Invoke(this, new AppClosedEventArgs(wb.FullName, OfficeAppType.Excel)); }
private void RegisterPowerPointAppClosedEvent(PowerPoint.Application app) { app.PresentationBeforeClose += (PowerPoint.Presentation pres, ref bool cancel) => AppClosedEvent?.Invoke(this, new AppClosedEventArgs(pres.FullName, OfficeAppType.PowerPoint)); }
private void RegisterWordAppClosedEvent(Word.Application app) { app.DocumentBeforeClose += (Word.Document doc, ref bool cancel) => AppClosedEvent?.Invoke(this, new AppClosedEventArgs(doc.FullName, OfficeAppType.Word)); }