package com.qst.dms.ui;


import com.qst.dms.entity.User;
import com.qst.dms.service.UserService;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

public class LoginFrame extends Application
{

    private static Scene scene;
    public static void main(String[] args)
    {
        Application.launch(args);
    }
    @Override
    public void start(Stage stage) throws Exception
    {
        Pane pane = FXMLLoader.load(getClass().getClassLoader().getResource("resources/LoginFrame.fxml"));
        scene = new Scene(pane);
        stage.setScene(scene);
        stage.setResizable(false);
        stage.show();
    }
    public static void close_scene()
    {
        Stage primaryStage=(Stage)scene.getWindow();//将submit(登录按钮)与MainApplication类中的primaryStage(新窗口)绑定 并执行close()
        primaryStage.close();//打开新的窗口 所以要关闭当前的窗口
        MainFrame mainFrame = new MainFrame();
        mainFrame.startapp();
    }

}