public Quiz(DBAccess db) { InitializeComponent(); this.db = db; ChooseQuestions(); LoadAnswers(); }
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); } }
public Form1() { InitializeComponent(); db = new DBAccess(); }