package top.r3944realms.docchecktoolrefactored;

import javafx.application.Application;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import top.r3944realms.docchecktoolrefactored.ui.SceneManager;

import java.util.Objects;

public class JavaFxApplication extends Application {
    public Image logo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/img/icon.jpg")));
    @Override
    public void init() throws Exception {
        super.init();
        System.setVersion("1.0");
    }

    @Override
    public void start(Stage primaryStage) {
        SceneManager.init(primaryStage, logo);
        SceneManager.switchLoginView();
        primaryStage.show();
    }

    @Override
    public void stop() throws Exception {
        // 关闭所有线程池
        ThreadPoolManager.shutdownAll();
        super.stop();
    }
}
