package org.aohe;

import com.formdev.flatlaf.FlatDarculaLaf;
import lombok.extern.slf4j.Slf4j;
import org.aohe.constant.SocketEnum;
import org.aohe.daemon.WatchDog;
import org.aohe.show.TrayFrameUtf8;
import org.aohe.web.SocketUtils;
import org.aohe.webcam.WebcamShowTask;

import javax.swing.*;

import org.aohe.constant.Control;

@Slf4j
public class Main {

    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(new FlatDarculaLaf());
        log.info("启动成功");
        SocketUtils.start(SocketEnum.CAM_SOCKET);
        Control.WEBCAM_SHOW_TASK = new WebcamShowTask();
        Control.WEBCAM_SHOW_TASK.start();
        WatchDog watchDog = new WatchDog();
        watchDog.setDaemon(true);
        watchDog.start();
        TrayFrameUtf8.initSystemTrayUTF8();
    }
}