예제 #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();
 }