Пример #1
0
        }                                      //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();
        }
Пример #2
0
 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);
     }
 }
Пример #3
0
 public bool DeleteDB(HistoryGame us)
 {
     return db.DeleteHistory(us);
 }
Пример #4
0
 public bool InsertDB(HistoryGame us)
 {
     return db.InsertHistory(us);
 }
Пример #5
0
 public HistoryViewModel()
 {
     hg = new HistoryGame();
     IHistoryrepository = new HistoryRepository();
     LoadAllHistory();
 }