public FrmGameRecords(FrmMenu frmMenu) { InitializeComponent(); FormSettings.SetSetting(this); MenuForm = frmMenu; try { using (var context = new RoadFighterDataEnt()) { var records = context.GameRecords.Select(x => new { x.Name, x.Score, x.Crash, x.GameID }) .OrderByDescending(x => x.Score) .ToList(); dtgRecords.DataSource = records; } } catch (Exception) { MessageBox.Show("Nie udało się połączyć z bazą danych"); } }
public FrmEndGame(FrmGame game, FrmMenu menuUI, string description, int score, int crash) { InitializeComponent(); FormSettings.SetSetting(this); ActualGame = game; MenuUI = menuUI; GameScore = score; GameCrash = crash; lblDescription.Text = description; lblScore.Text = "SCORE: " + score.ToString(); }
public FrmEndGame(FrmGame game, FrmMenu menuUI, string description, int score, int crash, string message) { InitializeComponent(); FormSettings.SetSetting(this); ActualGame = game; MenuUI = menuUI; GameScore = score; GameCrash = crash; lblDescription.Text = description; lblScore.Text = message; btnConfirm.Enabled = false; txbYourName.Enabled = false; }
public FrmMenu() { InitializeComponent(); FormSettings.SetSetting(this); }
public FrmControls(FrmMenu menuForm) { InitializeComponent(); FormSettings.SetSetting(this); MenuForm = menuForm; }