Zond: наводим порядок в коде
This commit is contained in:
@@ -30,15 +30,28 @@ public class Main {
|
||||
private static ScheduledFuture<?> sesFuture;
|
||||
private static int tryConnect = 0;
|
||||
|
||||
private static void printLogo() {
|
||||
System.out.println(
|
||||
Ansi.ansi().reset()
|
||||
.bold().fg(Color.WHITE).a("ASys").boldOff().a(":// ")
|
||||
.fg(Color.BLACK).bg(Color.RED).a("Zond").reset().newline()
|
||||
);
|
||||
}
|
||||
|
||||
public static void log(String message){
|
||||
System.out.println(
|
||||
Ansi.ansi().reset()
|
||||
.bg(Color.BLUE).fg(Color.WHITE).a("[ASys Zond] ")
|
||||
.a(message).reset()
|
||||
);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
if (Boolean.getBoolean("ansi.install")) {
|
||||
AnsiConsole.systemInstall();
|
||||
}
|
||||
|
||||
Ansi ansi = ansi().reset();
|
||||
ansi.bold().fg(Color.WHITE).a("ASys").boldOff().a(":// ");
|
||||
ansi.fg(Color.BLACK).bg(Color.RED).a("Zond").reset().newline();
|
||||
System.out.println(ansi.toString());
|
||||
printLogo();
|
||||
|
||||
if (args.length == 0) {
|
||||
System.out.println("no args");
|
||||
@@ -55,9 +68,11 @@ public class Main {
|
||||
ses.shutdown();
|
||||
client.disconnect();
|
||||
|
||||
System.out.print(ansi().reset().newline()
|
||||
System.out.println(
|
||||
Ansi.ansi().reset().newline()
|
||||
.fg(Color.GREEN).a("Process Finished. Code: ")
|
||||
.bold().fg(Color.WHITE).a(resultCode).reset().newline());
|
||||
.bold().fg(Color.WHITE).a(resultCode).reset()
|
||||
);
|
||||
}
|
||||
|
||||
private static int executeProcess(String[] args) {
|
||||
@@ -103,11 +118,6 @@ public class Main {
|
||||
fis.close();
|
||||
}
|
||||
|
||||
public static void log(String message){
|
||||
System.out.println(Ansi.ansi().bg(Color.BLUE).fg(Color.WHITE)
|
||||
.a("[ASys Zond] ").a(message).reset());
|
||||
}
|
||||
|
||||
public static void startReconnect() {
|
||||
client = new Client();
|
||||
ses = Executors.newScheduledThreadPool(2);
|
||||
|
||||
Reference in New Issue
Block a user