no message

This commit is contained in:
2024-10-08 22:33:49 +03:00
parent 90546fc62e
commit e0974fe4a8
246 changed files with 1170 additions and 849 deletions

View File

@@ -1,6 +1,7 @@
package Visual_DVM_2021.Passes;
import Common.CurrentAnchestor;
import Common.Utils.CommonUtils;
import Common.Visual.CommonUI;
import Common_old.Current;
import GlobalData.GlobalDatabase;
import _VisualDVM.Global;
@@ -191,30 +192,30 @@ public class Pass_2021<T> {
//-
private void PerformCanNotStart() throws Exception {
performCanNotStart();
if (CommonUtils.hasUI())
if (CommonUI.isActive())
showCanNotStart();
}
protected void PerformPreparation() throws Exception {
performPreparation();
if (CommonUtils.hasUI())
if (CommonUI.isActive())
showPreparation();
}
private void PerformFinish() throws Exception {
performFinish();
//-
if (CommonUtils.hasUI())
if (CommonUI.isActive())
showFinish();
}
private void PerformDone() throws Exception {
performDone();
//-
if (CommonUtils.hasUI())
if (CommonUI.isActive())
showDone();
}
private void PerformFail() throws Exception {
performFail();
//-
if (CommonUtils.hasUI())
if (CommonUI.isActive())
showFail();
}
//------
@@ -246,7 +247,7 @@ public class Pass_2021<T> {
Vector<String> ToPrint = new Vector<>();
createStack_r(ToDo, ToPrint);
if (Global.properties.ConfirmPassesStart && !ToPrint.isEmpty() &&
!UI.Question("Выполнить проход(ы):\n" + String.join("\n", ToPrint))
!CommonUI.Question("Выполнить проход(ы):\n" + String.join("\n", ToPrint))
) return false;
while (ToDo.size() > 1) {
if (!ToDo.pop().start()) return false;
@@ -257,7 +258,7 @@ public class Pass_2021<T> {
//-
if (Global.properties.ShowPassesDone && !ToPrint.isEmpty()
) {
UI.Info("Проход(ы)\n\n" + String.join("\n", ToPrint) +
CommonUI.Info("Проход(ы)\n\n" + String.join("\n", ToPrint) +
"\nуспешно выполнен(ы)!");
}
//-
@@ -271,7 +272,7 @@ public class Pass_2021<T> {
return false;
}
public void Interrupt() throws Exception {
UI.Info("Проход " + CommonUtils.Brackets(getDescription()) + " не разрешено прерывать.");
CommonUI.Info("Проход " + CommonUtils.Brackets(getDescription()) + " не разрешено прерывать.");
}
public boolean needsConfirmations() {
return false;
@@ -298,11 +299,11 @@ public class Pass_2021<T> {
timer.Start();
//------------------------------->
try {
if (CommonUtils.hasUI()) FocusBeforeStart();
if (CommonUI.isActive()) FocusBeforeStart();
if (canStart(args)) {
PerformPreparation();
//todo тут должна быть вилка на анимацию?
if (CommonUtils.hasUI() && needsAnimation()) {
if (CommonUI.isActive() && needsAnimation()) {
animation_sem = new Semaphore(1);
animation_sem.acquire();
//---
@@ -386,8 +387,8 @@ public class Pass_2021<T> {
" окончен за " + timer.Print() +
" состояние " + CommonUtils.Brackets(state.getDescription())
);
if (!Log.isEmpty() && CommonUtils.hasUI())
UI.Error(
if (!Log.isEmpty() && CommonUI.isActive())
CommonUI.Error(
"проход " + CommonUtils.Brackets(getDescription()) + "\n" + state.getDescription() + "\n\n" +
Log.toString());
}
@@ -396,7 +397,7 @@ public class Pass_2021<T> {
}
//--
public void ShowSapforMessage(String message) {
if (CommonUtils.hasUI() && form != null) {
if (CommonUI.isActive() && form != null) {
String[] data = message.split(":");
switch (data[0]) {
case "message_1":