Exemple #1
0
        public Quiz(DBAccess db)
        {
            InitializeComponent();
            this.db = db;

            ChooseQuestions();
            LoadAnswers();
        }
Exemple #2
0
        public History(DBAccess db)
        {
            InitializeComponent();
            this.db = db;

            listView1.View = View.Details;
            listView1.GridLines = true;
            listView1.FullRowSelect = true;

            listView1.Columns.Add("Name", 100);
            listView1.Columns.Add("Score", 100);

            foreach (DataLib.Quiz quiz in db.quizes)
            {
                String[] args = { quiz.Name, quiz.Score.ToString() };
                ListViewItem row = new ListViewItem(args);
                listView1.Items.Add(row);
            }
        }
Exemple #3
0
 public Form1()
 {
     InitializeComponent();
     db = new DBAccess();
 }