代码拉取完成,页面将自动刷新
using Microsoft.Office.Tools.Ribbon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace WordRegexAddIn
{
public partial class RegexRibbon
{
private RegexFinder finder;
private void RegexRibbon_Load(object sender, RibbonUIEventArgs e)
{
finder = new RegexFinder(Globals.ThisAddIn.Application);
}
private void btnFind_Click(object sender, RibbonControlEventArgs e)
{
finder.Find(editRegex.Text);
}
private void checkIgnoreCase_Click(object sender, RibbonControlEventArgs e)
{
if (checkIgnoreCase.Checked)
{
finder.Options |= RegexOptions.IgnoreCase;
}
else
{
finder.Options &= ~RegexOptions.IgnoreCase;
}
}
private void btnFindPrev_Click(object sender, RibbonControlEventArgs e)
{
finder.Previous(editRegex.Text);
}
private void btnReplace_Click(object sender, RibbonControlEventArgs e)
{
finder.Replace(editRegex.Text, editReplace.Text);
}
private void btnReplaceAll_Click(object sender, RibbonControlEventArgs e)
{
finder.ReplaceAll(editRegex.Text, editReplace.Text);
}
private void btnHelp_Click(object sender, RibbonControlEventArgs e)
{
System.Diagnostics.Process.Start("https://gitee.com/fldx/WordRegexAddIn");
}
private void btnUpdate_Click(object sender, RibbonControlEventArgs e)
{
System.Diagnostics.Process.Start("https://gitee.com/fldx/WordRegexAddIn/releases");
}
private void group1_DialogLauncherClick(object sender, RibbonControlEventArgs e)
{
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。