コード例 #1
0
        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");
            }
        }
コード例 #2
0
 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();
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 public FrmMenu()
 {
     InitializeComponent();
     FormSettings.SetSetting(this);
 }
コード例 #5
0
 public FrmControls(FrmMenu menuForm)
 {
     InitializeComponent();
     FormSettings.SetSetting(this);
     MenuForm = menuForm;
 }