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