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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| public partial class page_00_demarrage : Form
{
public page_00_demarrage()
{
InitializeComponent();
if (File.Exists("./bdd/bdd-options.xml"))
{
BDD_options.ReadXml("./bdd/bdd-options.xml");
}
if (File.Exists("./bdd/bdd.xml"))
{
BDD.ReadXml("./bdd/bdd.xml");
}
if (File.Exists("./bdd/bdd-villes.xml"))
{
BDD_villes.ReadXml("./bdd/bdd-villes.xml");
}
fnc_redimensionne_petit();
fnc_appliquer_couleur_fond_appli();
}
//
//Interface
//
private void fnc_redimensionne_petit()
{
ClientSize = new System.Drawing.Size(185, 200);
//page_00_demarrage.P
Screen screen = Screen.FromControl(this);
Rectangle workingArea = screen.WorkingArea;
this.Location = new Point()
{
X = Math.Max(workingArea.X, workingArea.X + (workingArea.Width - this.Width) / 2),
Y = Math.Max(workingArea.Y, workingArea.Y + (workingArea.Height - this.Height) / 2)
}; ;
fnc_appliquer_couleur_fond_appli();
}
private void fnc_appliquer_couleur_fond_appli()
{
string valeur_bdd_interface_couleur_appli = BDD_options.Tables[0].Rows[0][1].ToString();
if (valeur_bdd_interface_couleur_appli != "")
{
ActiveForm.BackColor = System.Drawing.Color.FromName(valeur_bdd_interface_couleur_appli.ToString());
}
}
Merci d'avance à ceux qui pourront m'aider a avancer... |
Partager