no message

This commit is contained in:
2024-10-11 00:00:30 +03:00
parent a11b7711f7
commit f317ab1aa1
341 changed files with 1866 additions and 1688 deletions

View File

@@ -1,5 +1,5 @@
package Common.Utils;
import Common.Visual.CommonUI;
import Common.Visual.UI_;
import _VisualDVM.Utils;
import java.io.File;
@@ -23,7 +23,7 @@ public interface Loggable {
default void Print(String message) {
try {
FileWriter Log = new FileWriter(getLogFile(), true);
String datedMessage = CommonUtils.Brackets(new Date()) + " " + message;
String datedMessage = Utils_.Brackets(new Date()) + " " + message;
Log.write(datedMessage + "\n");
Log.close();
} catch (Exception ignored) {
@@ -35,8 +35,8 @@ public interface Loggable {
ex.printStackTrace(writer);
writer.flush();
Print(out.toString());
if (CommonUI.isActive())
CommonUI.Error("Возникло исключение. Подробности в файле журнала\n" +
CommonUtils.Brackets(getLogFile().getAbsolutePath()));
if (UI_.isActive())
UI_.Error("Возникло исключение. Подробности в файле журнала\n" +
Utils_.Brackets(getLogFile().getAbsolutePath()));
}
}

View File

@@ -11,8 +11,8 @@ public class StringTemplate {
public String pattern = "";
//------------------------------------------------------------------
public StringTemplate(String p, String s) {
prefix = CommonUtils.removeRedundantSpaces(p);
suffix = CommonUtils.removeRedundantSpaces(s);
prefix = Utils_.removeRedundantSpaces(p);
suffix = Utils_.removeRedundantSpaces(s);
String[] prefix_words = prefix.split(" ");
String[] suffix_words = suffix.split(" ");
//настраиваем регулярное выражение----------

View File

@@ -6,7 +6,7 @@ public class TextLog {
}
public void Writeln_(String line) {
text += line + "\n";
CommonUtils.MainLog.Print(line);
Utils_.MainLog.Print(line);
}
public void Clear() {
text = "";

View File

@@ -21,7 +21,7 @@ import java.util.Vector;
import java.util.concurrent.Semaphore;
import java.util.regex.Matcher;
import java.util.stream.Collectors;
public class CommonUtils {
public class Utils_ {
static String HomePath = System.getProperty("user.dir");
public static void setHomePath(String path_in){
HomePath = path_in;
@@ -401,14 +401,14 @@ public class CommonUtils {
}
//Иконки
public static ImageIcon getIcon(String path) {
URL imageUrl = CommonUtils.class.getResource(path);
URL imageUrl = Utils_.class.getResource(path);
if (imageUrl == null) {
return null;
}
return new ImageIcon(imageUrl);
}
public static ImageIcon getTabIcon(String path) {
URL imageUrl = CommonUtils.class.getResource(path);
URL imageUrl = Utils_.class.getResource(path);
if (imageUrl == null) {
return null;
}