package tourplaner;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

import tourplaner.business.ConfigHelper;
import tourplaner.business.TourPlaner;

import java.io.IOException;

public class Main extends Application {


    public static void main(String[] args){
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws IOException {
        Parent root  = FXMLLoader.load(Main.class.getResource("tourplaner.fxml"));
        primaryStage.setTitle(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "apptitle"));
        primaryStage.getIcons().add(new Image("file:"+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo")));
        TourPlaner.init();
        primaryStage.setScene(new Scene(root, 1500, 1000));
        primaryStage.show();
    }
}
