示例#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));
 }