feat: 改变入口进行登录判断
This commit is contained in:
parent
e363d6df8b
commit
697756127c
Binary file not shown.
@ -88,6 +88,30 @@ namespace AIProofread
|
||||
return CurrentUpgrade != null && CurrentUpgrade.NeedUpgrade(Config.APP_VERSION) && CurrentUpgrade.UpgradeType == 1;
|
||||
}
|
||||
|
||||
public void SendNoticeToCheckAll()
|
||||
{
|
||||
Globals.ThisAddIn.ShowDetection();
|
||||
Globals.ThisAddIn.formCommonsenseDetection.SendMessageToWeb("detect-all", null);
|
||||
}
|
||||
public void SendNoticeToCheckRange(int start, int end)
|
||||
{
|
||||
Globals.ThisAddIn.ShowDetection();
|
||||
// 获取当前选中的选区的首尾段落起始与结束位置
|
||||
if (start != -1 && end != -1)
|
||||
{
|
||||
var currectSelectRange = Globals.ThisAddIn.ribbon.currectSelectRange;
|
||||
start = currectSelectRange.Paragraphs.First.Range.Start;
|
||||
end = currectSelectRange.Paragraphs.Last.Range.End;
|
||||
}
|
||||
var data = JSONObject.Create().AddField("start", start).AddField("end", end).ToString();
|
||||
Globals.ThisAddIn.formCommonsenseDetection.SendMessageToWeb("detect-range", data);
|
||||
}
|
||||
public void SendNoticeToShowCheckHistory()
|
||||
{
|
||||
Globals.ThisAddIn.ShowDetection();
|
||||
Globals.ThisAddIn.formCommonsenseDetection.SendMessageToWeb("show-history", null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查插件更新信息
|
||||
/// </summary>
|
||||
|
@ -25,7 +25,7 @@ namespace AIProofread
|
||||
/// <summary>
|
||||
/// 网页访问地址
|
||||
/// </summary>
|
||||
public static string WEB_PATH = "http://localhost:5173/"; //pre-gm-plugin.gachafun.com 192.168.0.231:5137 192.168.10.100:5173 gm2-plugin.zverse.group
|
||||
public static string WEB_PATH = "http://gm2-plugin.zverse.group/"; //pre-gm-plugin.gachafun.com 192.168.0.231:5137 192.168.10.100:5173 gm2-plugin.zverse.group
|
||||
public static bool RUN_IN_DEBUG = true;
|
||||
public static AppEnvironment APP_ENV = AppEnvironment.Dev;
|
||||
#else
|
||||
|
@ -567,24 +567,22 @@ namespace AIProofread
|
||||
|
||||
private void btnDetectionAll_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
Globals.ThisAddIn.ShowDetection();
|
||||
Globals.ThisAddIn.formCommonsenseDetection.SendMessageToWeb("detect-all", null);
|
||||
Globals.ThisAddIn.SendMessageToWeb("show-check-all", "");
|
||||
}
|
||||
|
||||
private void btnDetectionParagraph_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
Globals.ThisAddIn.ShowDetection();
|
||||
// 获取当前选中的选区的首尾段落起始与结束位置
|
||||
var start = currectSelectRange.Paragraphs.First.Range.Start;
|
||||
var end = currectSelectRange.Paragraphs.Last.Range.End;
|
||||
var data = JSONObject.Create().AddField("start",start).AddField("end",end).ToString();
|
||||
Globals.ThisAddIn.formCommonsenseDetection.SendMessageToWeb("detect-range", data);
|
||||
var data = JSONObject.Create().AddField("start", start).AddField("end", end).ToString();
|
||||
|
||||
Globals.ThisAddIn.SendMessageToWeb("show-check-range", data);
|
||||
}
|
||||
|
||||
private void btnDetectionHistory_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
Globals.ThisAddIn.ShowDetection();
|
||||
Globals.ThisAddIn.formCommonsenseDetection.SendMessageToWeb("show-history", null);
|
||||
Globals.ThisAddIn.SendMessageToWeb("show-check-history", "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user