|
|
@ -14,20 +14,26 @@ namespace Biblioteque_de_Class
|
|
|
|
public Theme(string nom, List<string> listCouleur)
|
|
|
|
public Theme(string nom, List<string> listCouleur)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Nom = nom;
|
|
|
|
Nom = nom;
|
|
|
|
ListCouleur = List<string>({ "#red", "#blue", "#green" });
|
|
|
|
ListCouleur = listCouleur;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string GetNom() { return Nom; }
|
|
|
|
public string GetNom() { return Nom; }
|
|
|
|
public List<string> GetColorList() { return ListCouleur; }
|
|
|
|
public List<string> GetColorList() { return ListCouleur; }
|
|
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"nom : {Nom} color 1: {Listcouleur[0]}\ncolor 2: {Listcouleur[1]}\ncolor 3: {Listcouleur[2]}\n";
|
|
|
|
public override string ToString() => $"nom : {Nom} color 1: {ListCouleur[0]}\ncolor 2: {ListCouleur[1]}\ncolor 3: {ListCouleur[2]}\n";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// changer la couleur spécifique d'un theme
|
|
|
|
/// changer la couleur spécifique d'un theme
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public void ChangeColor(string color, string newColor)
|
|
|
|
public void ChangeColor(string color, string newColor)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ListCouleur[color] = newColor;
|
|
|
|
for (int i = 0; i < ListCouleur.Count; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (ListCouleur[i] == color)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ListCouleur[i] = newColor;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|