Пример #1
0
 private void Application_WorkbookActivate(Excel.Workbook Wb)
 {
     Common.WriteConsole("Addin事件:Application_WorkbookActivate,工作簿:" + Wb.FullName);
     try
     {
         if (this.Application.ActiveWorkbook != null)
         {
             string caption = Convert.ToString(Application.ActiveWindow.Caption);
             if (caption != null && !caption.StartsWith("★") && !caption.EndsWith("★"))
             {
                 Application.ActiveWindow.Caption = string.Format("★ {0} ★ [{1}]★", Application.ActiveWindow.Caption, Application.ActiveWorkbook.Path);
             }
             //RuntimeDebugInfo.AppendText("当前工作簿:" + this.Application.ActiveWorkbook.FullName);
         }
         Spotlight.Reset();
     }
     catch (Exception ex)
     {
         Common.WriteConsole("工作簿激活事件执行异常:" + Wb.FullName + ex.Message + ex.StackTrace);
     }
 }
Пример #2
0
 private void Application_WindowDeactivate(Excel.Workbook Wb, Excel.Window Wn)
 {
     Spotlight.Hidden();
 }
Пример #3
0
 private void Application_WorkbookDeactivate(Excel.Workbook Wb)
 {
     Common.WriteConsole("Addin事件:Application_WorkbookDeactivate,工作簿:" + Wb.FullName);
     Spotlight.Hidden();
 }