package tourplaner.ui;

import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import org.apache.log4j.Logger;

import java.io.IOException;

/**
 * Presenter des Tourplaners
 */
public class PresenterMain {

    /**
     * Startet die Gui
     * @param primaryStage Stage der GUI
     * @param logger Aktueller Logger
     */
    public PresenterMain(Stage primaryStage, Logger logger){
        Parent root = null;
        try {
            root = FXMLLoader.load(getClass().getResource("../ui/tourplaner.fxml"));
            primaryStage.setTitle("DerGeorg Touren Planer");
            primaryStage.setScene(new Scene(root, 600, 600));
            primaryStage.show();
        } catch (IOException e) {
            logger.error(e.getMessage());
        }

    }
}
