fixed: 细化按钮状态调整
This commit is contained in:
parent
22095404e0
commit
907f4bc971
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ bin
|
|||||||
packages
|
packages
|
||||||
TestConsoleApp
|
TestConsoleApp
|
||||||
.vs
|
.vs
|
||||||
|
obj
|
||||||
**/obj/Debug/**
|
**/obj/Debug/**
|
||||||
**/obj/Release/**
|
**/obj/Release/**
|
||||||
**/obj/Test/**
|
**/obj/Test/**
|
@ -601,10 +601,10 @@ namespace AIProofread
|
|||||||
btnDetectionAll.Enabled = r.Start == r.End;
|
btnDetectionAll.Enabled = r.Start == r.End;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetDetectionBtnStatus(bool status)
|
public void SetDetectionBtnStatus(bool allStatus,bool rangeStatus)
|
||||||
{
|
{
|
||||||
btnDetectionAll.Enabled = status;
|
btnDetectionAll.Enabled = allStatus;
|
||||||
btnDetectionParagraph.Enabled = status;
|
btnDetectionParagraph.Enabled = rangeStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace AIProofread.core
|
|||||||
this.checkingKey = checkingKey;
|
this.checkingKey = checkingKey;
|
||||||
this.checkingSummary = checkingSummary;
|
this.checkingSummary = checkingSummary;
|
||||||
this.checkingLocation = checkingLocation;
|
this.checkingLocation = checkingLocation;
|
||||||
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(false);
|
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(false,false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -72,7 +72,8 @@ namespace AIProofread.core
|
|||||||
this.checkingKey = null;
|
this.checkingKey = null;
|
||||||
this.checkingSummary = null;
|
this.checkingSummary = null;
|
||||||
this.checkingLocation = null;
|
this.checkingLocation = null;
|
||||||
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(true);
|
var enableAll = string.IsNullOrEmpty(checkingSummary);
|
||||||
|
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(enableAll,!enableAll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,6 +99,11 @@ namespace AIProofread.core
|
|||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
if (isChecking)
|
||||||
|
{
|
||||||
|
Globals.ThisAddIn.formCommonsenseDetection.Hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Globals.ThisAddIn.HideDetection();
|
Globals.ThisAddIn.HideDetection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user