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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace WinTestColorControl
{
public enum CouleurBouton
{
Bleu,
Rouge,
Vert,
Jaune,
Rose,
Pourpre,
None
}
// DICTIONNAIRE "TRANSLATEUR" VU TON ENUM FRANCAIS
public class DicoCouleurs : Dictionary<CouleurBouton, Color>
{
public DicoCouleurs()
{
this.Add(CouleurBouton.Bleu, Color.Blue);
this.Add(CouleurBouton.Rouge, Color.Red);
this.Add(CouleurBouton.Vert, Color.Green);
this.Add(CouleurBouton.Jaune, Color.Yellow );
this.Add(CouleurBouton.Rose , Color.Pink );
this.Add(CouleurBouton.Pourpre, Color.Purple );
this.Add(CouleurBouton.None, Color.Transparent);
}
}
} |
Partager