/// <summary> /// Loads the patient list from an external SQLite database. /// </summary> /// <returns>A list of patient names from the database.</returns> private List<string> LoadList() { //File.Decrypt("../../Resources/AHS.s3db"); GameLibrary.Database patientData = new GameLibrary.Database("../../Resources/AHS.s3db"); //GameLibrary.Database patientData = new GameLibrary.Database("AHS.s3db"); DataTable ids = patientData.Select("ID", "Users"); List<String> patientIDS = new List<String>(); foreach (DataRow dr in ids.Rows) { patientIDS.Add(dr[0].ToString()); } //File.Encrypt("../../Resources/AHS.s3db"); Cursor.Current = Cursors.Default; return patientIDS; }
private void SaveResults() { //File.Decrypt("../../Resources/AHS.s3db"); GameLibrary.Database db = new GameLibrary.Database("../../Resources/AHS.s3db"); //GameLibrary.Database db = new GameLibrary.Database("AHS.s3db"); Dictionary<string, string> dictionary = new Dictionary<string, string>(); dictionary.Add("ID", ((Manager)ScreenManager).PatientName); dictionary.Add("Score", ((Manager)ScreenManager).Repetitions.ToString()); dictionary.Add("Missed", ((Manager)ScreenManager).Missed.ToString()); dictionary.Add("Time", ((Manager)ScreenManager).Time.ToString()); dictionary.Add("Hand", ((Manager)ScreenManager).Hand); dictionary.Add("Displayed", ((Manager)ScreenManager).MoleNumber.ToString()); dictionary.Add("MoleTime", ((Manager)ScreenManager).MoleTimer.ToString()); db.Insert("WAM", dictionary); //File.Encrypt("../../Resources/AHS.s3db"); }