using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TP08_GestEtudiants
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            int nocol, nolig;
            grdnotes.AllowUserToAddRows = false;
            grdnotes.RowHeadersVisible = false;
            //Création des 12 colonnes de la grille 
            grdnotes.ColumnCount = 12;
            //Colonne 0
            grdnotes.Columns[0].Name = "Matière";
            grdnotes.Columns[0].Width = 150;
            //Génération automatique des colonnes 1 à 10 
            for (nocol = 1; nocol < grdnotes.ColumnCount - 1; nocol = nocol + 1)
            {
                grdnotes.Columns[nocol].Name = nocol.ToString();
                grdnotes.Columns[nocol].Width = 50;
            }
            //Colonne 11
            grdnotes.Columns[11].Name = "Moyenne";
            //Lignes de la grille avec ajout des données
            grdnotes.Rows.Clear();
            grdnotes.Rows.Add("Français", 10, 8, 9.5);
            grdnotes.Rows.Add("Mathématiques", 11, 12.5);
            grdnotes.Rows.Add("Anglais", 6, 8, 10, 8.5);
            grdnotes.Rows.Add("Eco.Man.Jur", 12, 14);
            grdnotes.Rows.Add("Bloc 1A", 10, 15, 7);
            grdnotes.Rows.Add("Bloc 1B", 11, 13, 7.5, 10);
            grdnotes.Rows.Add("Bloc 3A", 12, 14, 11.5);
            grdnotes.Rows.Add("Bloc 3B", 11, 14, 9.5);
            grdnotes.Rows.Add("AtelierPro", 8, 10.5, 12, 10.5);
            grdnotes.Rows.Add("Moyenne Générale");
            //Redimensionnement de la hauteur des lignes
            for (nolig = 0; nocol < grdnotes.RowCount; nocol = nocol + 1)
            {
                grdnotes.Rows[nolig].Height = 20;
            }
        }

        private void btnmoylig2_Click(object sender, EventArgs e)
        {
            int nolig, nocol, nbnotes;
            double somnotes, moyenne;

        
        
        }

        private void btnmoylig_Click(object sender, EventArgs e)
        {
                
        }

        private void btnmoyligsel_Click(object sender, EventArgs e)
        {

        }

        private void btnmoycol11_Click(object sender, EventArgs e)
        {

        }

    }
}
