public void Execute(IJobExecutionContext context) { if (application != null) { ProcessExcelHelper.processExcel(application); LogHelper.Info("定时器保存:" + context); //LogHelper.Info("Tullett Start at " + DateTime.Now); //LogFileName.Write("Tullett Start at " + DateTime.Now); } }
// Handles the event when a button on the new toolbar is clicked. private void ButtonClick(Office.CommandBarButton ctrl, ref bool cancel) { try { ConfigInfo configInfo = IniConfigHelper.ReadConfigInfo(); QuartService.StartJob(configInfo.VkInterval); ProcessExcelHelper.processExcel(Application); LogHelper.Info("手动点击保存"); MessageBox.Show("保存成功", "提示"); } catch (Exception e) { LogHelper.Error(e); MessageBox.Show(e.Message); } }