private void InitStatus() { UpdateController controller = new UpdateController(this); controller.CheckUpdate(); //UpgradeService us = new UpgradeService(true); //us.SynCheckUpdate(); MagazineStyle se = MagazineStyle.GetInstance(); if (se.Exist()) { cb_style.Text = se.Name; } //2016-06-13 测试 吴海龙 WordApplication.GetInstance().WordApp = Globals.ThisAddIn.Application; //WordApplication.GetInstance().WordApp = Globals.ThisAddIn.Application; //日志目录 if (!Directory.Exists("C:\\log\\")) { Directory.CreateDirectory("C:\\log\\"); } //多线程下载样式避免,网络卡顿造成word 卡死。 Thread t = new Thread(DownloadStyles); t.Start(); RefreshStyleList(); }
void Application_WindowBeforeRightClick(Word.Selection Sel, ref bool Cancel) { Word.Field _field = CommonFunction.GetFieldBySection(WordApplication.GetInstance().WordApp); if (_field == null) { return; } if (_field.Code.Text.Contains(QuotationItem.FLAG) || _field.Code.Text.Contains(QuotationItem.FLAG)) { addBtn.Enabled = true; WordApplication.GetInstance().WordApp.ActiveDocument.Range(_field.Result.End + 1, _field.Result.End + 1).Select(); } }
private void button18_Click(object sender, RibbonControlEventArgs e) { Word.Paragraph p = CommonFunction.AddParagraphAtSelection(WordApplication.GetInstance().WordApp); }