package com.ryuuji.main;

import com.ryuuji.visual.MainScreen;
import logica.ExNihilo;
import logica.Search;

import javax.swing.*;

public class App {
    /**
     * Inicia el programa :3
     *
     * @param args no se utiliza
     */
    public static void main(String[] args) {
        //ExNihilo.deleteAll();
        //ExNihilo.fill();
        if (Search.buscarColegio("Colegio San Francisco") == null) {
            ExNihilo.crearColegio("Colegio San Francisco");
        }
        screen();
    }

    /**
     * Da inicio a la ventana seteando las propiedades visuales iniciales.
     */
    private static void screen() {
        System.setProperty("awt.useSystemAAFontSettings", "on");
        System.setProperty("swing.aatext", "true");
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
        } catch (ClassNotFoundException | UnsupportedLookAndFeelException | IllegalAccessException | InstantiationException e) {
            e.printStackTrace();
        }
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (IllegalAccessException | InstantiationException | UnsupportedLookAndFeelException | ClassNotFoundException e) {
            e.printStackTrace();
        }
        new MainScreen();

    }
}