package com.zhangmeng.online.exam.ui.api.form;

import com.zhangmeng.online.exam.ui.api.form.base.Form;
import com.zhangmeng.online.exam.ui.controller.QuestionEditController;
import javafx.fxml.FXMLLoader;

import java.io.IOException;

/**
 * @author zm
 * @date 2025/4/1 11:35
 * @version: 1.0
 */
public class QuestionForm extends Form {

    private final QuestionEditController controller;

    public QuestionEditController getController() {
        return controller;
    }

    public QuestionForm() {
        try {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/question-edit.fxml"));
            this.getChildren().add(fxmlLoader.load());
            controller = fxmlLoader.getController();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
