} //Win or lose #endregion #region Constructor public GameViewModel(string x, string y, Button[] b) { this.getP1 = x; this.getP2 = y; this.Title = x + " vs " + y; buttons = b; hg = new HistoryGame(); IHistoryrepository = new HistoryRepository(); }
public bool DeleteHistory(HistoryGame hg) { try { using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "historyGame.db3"))) { connection.Delete(hg); return(true); } } catch (SQLiteException ex) { return(false); } }
public bool DeleteDB(HistoryGame us) { return db.DeleteHistory(us); }
public bool InsertDB(HistoryGame us) { return db.InsertHistory(us); }
public HistoryViewModel() { hg = new HistoryGame(); IHistoryrepository = new HistoryRepository(); LoadAllHistory(); }