first commit

This commit is contained in:
2024-11-09 08:55:17 +07:00
commit f6ee4817e6
98 changed files with 85493 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
package id.co.gtc.erhacam;
import Config.SomeCodes;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.stage.Screen;
import javafx.stage.Stage;
import org.tinylog.Logger;
import java.io.IOException;
import static Config.SomeCodes.config;
public class MainApplication extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml"));
Screen screen = Screen.getPrimary();
Rectangle2D screenbound = screen.getVisualBounds();
Scene scene = new Scene(fxmlLoader.load(), screenbound.getWidth(), screenbound.getHeight());
stage.setTitle("MultiCam Capture App for ERHA");
stage.setScene(scene);
stage.setResizable(false);
stage.setMaximized(true);
stage.setOnCloseRequest(e->{
config.Save();
MainView mainView = fxmlLoader.getController();
mainView.Unload();
Logger.info("Application closed");
});
SomeCodes.LoadQRReader();
SomeCodes.LoadFaceDetector();
stage.show();
Logger.info("Application started");
}
public static void main(String[] args) {
SomeCodes.ExtractResource("/tinylog.properties");
launch();
}
}