/// <summary> /// Bouton pour la connexion /// </summary> private void button1_Click(object sender, EventArgs e) { Serializer b = new Serializer(); b.SerialiserConnectBDD(textBox1.Text,textBox2.Text); IHM main = new IHM(this); this.Hide(); main.Show(); }
/// <summary> /// Méthode appelée au chargement de la fenètre /// </summary> private void Connexion_Load(object sender, EventArgs e) { //deserialisation des parametres de la connection Serializer load = new Serializer(); param_connect = load.DeserialiserConnectBDD(); //TODO passer par la couche business if (param_connect != null) { textBox1.Text = param_connect.Username; textBox2.Text = param_connect.Password; } }
private void IHM_Load(object sender, EventArgs e) { //deserialisation des parametres de la fenetre Serializer load = new Serializer(); SaveForm param_fenetre = load.DeserialiserFenetre(); //TODO passer par la couche business if (param_fenetre != null) { this.Size = new System.Drawing.Size(param_fenetre.Weightform, param_fenetre.Heightform); this.splitContainer1.SplitterDistance = param_fenetre.Splitterdistance; this.Location = new System.Drawing.Point(param_fenetre.LocalisationX, param_fenetre.LocalisationY); } BusinessLayer.Metier.Bibliotheque b =new BusinessLayer.Metier.Bibliotheque(); b.UpdateBdd(); foreach (BusinessLayer.Interfaces.ILivre l in b.Livre) { TreeNode n = new TreeNode(l.Titre); n.Tag = l; treeView1.Nodes.Add(n); } }
/// <summary> /// Méthode appelée au lancement /// </summary> private void IHM_Load(object sender, EventArgs e) { //deserialisation des parametres de la fenetre Serializer load = new Serializer(); SaveForm param_fenetre = load.DeserialiserFenetre(); if (param_fenetre != null) { this.Size = new System.Drawing.Size(param_fenetre.Weightform, param_fenetre.Heightform); this.splitContainer1.SplitterDistance = param_fenetre.Splitterdistance; this.Location = new System.Drawing.Point(param_fenetre.LocalisationX, param_fenetre.LocalisationY); } UpdateTree(); }
/// <summary> /// Methode appelée quand on ferme la fenètre /// </summary> private void IHM_FormClosing(object sender, FormClosingEventArgs e) { Serializer save = new Serializer(); save.SerialiserFenetre(this.Size.Width, this.Size.Height, this.splitContainer1.SplitterDistance, this.Location.X, this.Location.Y); _mainFrame.Close(); }