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