コード例 #1
0
 private void CreateForm_Load(object sender, EventArgs e)
 {
     //we need to add background image for our form
     //so, the first step will be adding the image in the Resources.resx. In the Resources.resx we are uploading the files that will be used in the current project
     //next step is connecting this image to this form through properties
     this.BackgroundImage = Properties.Resources.Background;
     //here we are initialize dataContext
     dataContext = new LinqToSqlConnectionClassDataContext();
 }
コード例 #2
0
 private void MainMenu_Load(object sender, EventArgs e)
 {
     //prevents user from creating rows right in the table
     playersTable.AllowUserToAddRows = false;
     //setting the background
     this.BackgroundImage = Properties.Resources.Background;
     //initializing data context
     dataContext = new LinqToSqlConnectionClassDataContext();
     //filling the data grid with the data from the players_statistics table
     playersTable.DataSource = dataContext.players_statistics;
 }