Ejemplo n.º 1
0
 public HighscoreDialogViewModel(HighscoreDialog HighscoreDialog)
 {
     highscoreDialog = HighscoreDialog;
     using (HighscoresContext db = new HighscoresContext())
     {
         HighscoresList = db.Highscores.OrderBy(x => x.Time).ThenBy(x => x.Moves).Take(3).ToList();
     }
 }
Ejemplo n.º 2
0
        public void SaveHighscoreExecute()
        {
            highscore.Name = enterHighscore.EnterName.Text;
            using (HighscoresContext db = new HighscoresContext())
            {
                db.Entry(highscore).State = EntityState.Modified;
                db.SaveChanges();
            }
            enterHighscore.Close();
            HighscoreDialog hd = new HighscoreDialog();

            hd.ShowDialog();
        }
Ejemplo n.º 3
0
        public void HighscoresExecute()
        {
            HighscoreDialog hd = new HighscoreDialog();

            hd.ShowDialog();
        }