コード例 #1
0
        public WelcomingScreen()
        {
            InitializeComponent();
            MySqlDatabaseConnection db       = new MySqlDatabaseConnection("EEPrep.DatabaseConnection");
            MySqlDataProvider       provider = new MySqlDataProvider(db);

            _questionController = new QuestionController(provider);
        }
コード例 #2
0
        //private string choice;

        public QuestionForm(Student person)
        {
            InitializeComponent();
            Person = person;
            ClearBoxes();
            numTextBox.Text = "1";
            // it takes the string for the provider name and looks for it
            //in the app.config file
            this.dataProvider       = new MySqlDataProvider(new MySqlDatabaseConnection());
            this.questionController = new QuestionController(dataProvider);
            questions = questionController.GetQuestions(Person.Topic);

            /* pager = new Pager()
             * {
             *   PageSize = 1,
             *   ItemCount = questions.Count,
             *   PageIndex = 0
             * };*/
            numQuestions = questions.Count <Question>();
        }