public AddNewResultForm(DatabaseEngine databaseEngine)
        {
            InitializeComponent();

            dateTimePickerPassingTime.Value = DateTime.Now;
            _databaseEngine = databaseEngine;
        }
Exemple #2
0
        public MainForm()
        {
            InitializeComponent();

            string dbFolderPath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath) ?? string.Empty, "Database");

            if (!Directory.Exists(dbFolderPath))
            {
                Directory.CreateDirectory(dbFolderPath);
            }

            _classEngine      = new ClassEngine(dbFolderPath);
            _pupilEngine      = new PupilEngine(dbFolderPath);
            _testResultEngine = new TestResultEngine(dbFolderPath);

            _anxietyTestResultMaker = new AnxietyTestResultMaker();
            _databaseEngine         = new DatabaseEngine(_anxietyTestResultMaker, _classEngine, _pupilEngine, _testResultEngine);
        }