1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| class PR_CELL
{
public string text;
public StringFormat format;
public float Width;
public bool ShowIt; // en prevision dialogue de choix colonnes
static public PR_CELL[] MakeArray(int n)
{
PR_CELL []A = new PR_CELL[n];
for (int i = 0; i < n; i++)
{
A[i] = new PR_CELL();
}
return A;
}
}
// Je cree un array de cette classe
PR_CELL[] lCell = PR_CELL.MakeArray(6);
// Et je place chaque element dans un dictionnaire
Dictionary<string, PR_CELL> xCell = new Dictionary<string, PR_CELL>();
xCell.Add("Min", lCell[0]);
xCell.Add("Max", lCell[1]);
xCell.Add("Prct", lCell[2]);
xCell.Add("nbEnt", lCell[3]);
xCell.Add("Legend", lCell[4]);
xCell.Add("Total", lCell[5]);
// Pour l'attribution des propriété je travaille via la clef du dico
// Pour l'impression je respecte l'odre via un for su le tableau lCell |