From 515911070d01b823d09ae4c6b0273b3664907b48 Mon Sep 17 00:00:00 2001 From: xdatomic-the-codeur Date: Wed, 25 Sep 2024 12:18:50 +0200 Subject: [PATCH] B1.2 SQ2 finie --- Contacts.sln | 25 ++ Contacts/App.config | 6 + Contacts/Contact.cs | 117 +++++++ Contacts/Contacts.csproj | 108 ++++++ Contacts/FrmContacts.Designer.cs | 289 ++++++++++++++++ Contacts/FrmContacts.cs | 383 ++++++++++++++++++++++ Contacts/FrmContacts.resx | 120 +++++++ Contacts/Program.cs | 22 ++ Contacts/Properties/AssemblyInfo.cs | 36 ++ Contacts/Properties/Resources.Designer.cs | 133 ++++++++ Contacts/Properties/Resources.resx | 142 ++++++++ Contacts/Properties/Settings.Designer.cs | 30 ++ Contacts/Properties/Settings.settings | 7 + Contacts/Resources/ajouter.png | Bin 0 -> 3849 bytes Contacts/Resources/annuler.png | Bin 0 -> 3757 bytes Contacts/Resources/modifier.png | Bin 0 -> 4281 bytes Contacts/Resources/playagain.png | Bin 0 -> 4925 bytes Contacts/Resources/standard.png | Bin 0 -> 6137 bytes Contacts/Resources/supprimer.png | Bin 0 -> 5213 bytes Contacts/Resources/vide.png | Bin 0 -> 664 bytes Contacts/Serialise.cs | 69 ++++ 21 files changed, 1487 insertions(+) create mode 100644 Contacts.sln create mode 100644 Contacts/App.config create mode 100644 Contacts/Contact.cs create mode 100644 Contacts/Contacts.csproj create mode 100644 Contacts/FrmContacts.Designer.cs create mode 100644 Contacts/FrmContacts.cs create mode 100644 Contacts/FrmContacts.resx create mode 100644 Contacts/Program.cs create mode 100644 Contacts/Properties/AssemblyInfo.cs create mode 100644 Contacts/Properties/Resources.Designer.cs create mode 100644 Contacts/Properties/Resources.resx create mode 100644 Contacts/Properties/Settings.Designer.cs create mode 100644 Contacts/Properties/Settings.settings create mode 100644 Contacts/Resources/ajouter.png create mode 100644 Contacts/Resources/annuler.png create mode 100644 Contacts/Resources/modifier.png create mode 100644 Contacts/Resources/playagain.png create mode 100644 Contacts/Resources/standard.png create mode 100644 Contacts/Resources/supprimer.png create mode 100644 Contacts/Resources/vide.png create mode 100644 Contacts/Serialise.cs diff --git a/Contacts.sln b/Contacts.sln new file mode 100644 index 0000000..79ac1dc --- /dev/null +++ b/Contacts.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30104.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contacts", "Contacts\Contacts.csproj", "{7A989FF0-CB51-4312-B11C-5F8476E5A113}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7A989FF0-CB51-4312-B11C-5F8476E5A113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A989FF0-CB51-4312-B11C-5F8476E5A113}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A989FF0-CB51-4312-B11C-5F8476E5A113}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A989FF0-CB51-4312-B11C-5F8476E5A113}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6BDD0F5B-A066-402D-BABE-A977D94B24AD} + EndGlobalSection +EndGlobal diff --git a/Contacts/App.config b/Contacts/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Contacts/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Contacts/Contact.cs b/Contacts/Contact.cs new file mode 100644 index 0000000..6531751 --- /dev/null +++ b/Contacts/Contact.cs @@ -0,0 +1,117 @@ +using System; +using System.Drawing; + +namespace Contacts +{ + /// + /// Classe Contact + /// mémorise les informations du contact + /// + [SerializableAttribute] + public class Contact : IComparable +// public class Contact + { + private string nom; + private string prenom; + private string tel; + private Image photo; + + /// + /// Constructeur + /// + /// nom + /// prénom + /// téléphone + /// photo + public Contact(string nom, string prenom, string tel, Image photo) + { + this.nom = nom; + this.prenom = prenom; + this.tel = tel; + this.photo = photo; + } + /// + /// Constructeur pour une entreprise + /// + /// Nom de l'entreprise + /// Numéro de téléphone de l'entreprise + /// Photo de contact de l'entreprise + public Contact(string nom, string tel, Image photo) + { + this.nom = nom; + this.tel = tel; + this.photo = photo; + } + + /// + /// Indique si une valeur est une entreprise ou non + /// + /// true si c'est une personne, false dans le cas contraire. + public bool IsPersonne() + { + if(this.getPrenom() == null) + { + return false; + } + else + { + return true; + } + } + + /// + /// getter sur nom + /// + /// nom + public string getNom() + { + return this.nom; + } + + /// + /// getter sur prenom + /// + /// prenom + public string getPrenom() + { + return this.prenom; + } + + /// + /// getter sur tel + /// + /// tel + public string getTel() + { + return this.tel; + } + + /// + /// getter sur photo + /// + /// photo + public Image getPhoto() + { + return this.photo; + } + + /// + /// informations sur le contact + /// + /// nom + prenom + (tel) + public override string ToString() + { + return this.nom + " " + this.prenom + " (" + this.tel + ")"; + } + + /// + /// Comparaison des noms pour le tri + /// + /// contact à comparer + /// comparaison sur le nom + public int CompareTo(object obj) + { + return nom.CompareTo(((Contact)obj).getNom()); + } + } +} diff --git a/Contacts/Contacts.csproj b/Contacts/Contacts.csproj new file mode 100644 index 0000000..db5fa70 --- /dev/null +++ b/Contacts/Contacts.csproj @@ -0,0 +1,108 @@ + + + + + Debug + AnyCPU + {7A989FF0-CB51-4312-B11C-5F8476E5A113} + WinExe + Contacts + Contacts + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Contacts.xml + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + FrmContacts.cs + + + + + True + True + Resources.resx + + + + FrmContacts.cs + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Contacts/FrmContacts.Designer.cs b/Contacts/FrmContacts.Designer.cs new file mode 100644 index 0000000..717a427 --- /dev/null +++ b/Contacts/FrmContacts.Designer.cs @@ -0,0 +1,289 @@ +namespace Contacts +{ + partial class frmContacts + { + /// + /// Variable nécessaire au concepteur. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Nettoyage des ressources utilisées. + /// + /// true si les ressources managées doivent être supprimées ; sinon, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Code généré par le Concepteur Windows Form + + /// + /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas + /// le contenu de cette méthode avec l'éditeur de code. + /// + private void InitializeComponent() + { + this.lblChoixPhoto = new System.Windows.Forms.Label(); + this.lstContact = new System.Windows.Forms.ListBox(); + this.grbAjout = new System.Windows.Forms.GroupBox(); + this.radioEntreprise = new System.Windows.Forms.RadioButton(); + this.radioPerso = new System.Windows.Forms.RadioButton(); + this.btnAnnuler = new System.Windows.Forms.Button(); + this.btnAjouter = new System.Windows.Forms.Button(); + this.txtTel = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtPrenom = new System.Windows.Forms.TextBox(); + this.lblPrenom = new System.Windows.Forms.Label(); + this.txtNom = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnNouveauContact = new System.Windows.Forms.Button(); + this.grbContacts = new System.Windows.Forms.GroupBox(); + this.btnSuppr = new System.Windows.Forms.Button(); + this.btnModif = new System.Windows.Forms.Button(); + this.imgPhoto = new System.Windows.Forms.PictureBox(); + this.grbAjout.SuspendLayout(); + this.grbContacts.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.imgPhoto)).BeginInit(); + this.SuspendLayout(); + // + // lblChoixPhoto + // + this.lblChoixPhoto.BackColor = System.Drawing.Color.Transparent; + this.lblChoixPhoto.Enabled = false; + this.lblChoixPhoto.Location = new System.Drawing.Point(31, 186); + this.lblChoixPhoto.Name = "lblChoixPhoto"; + this.lblChoixPhoto.Size = new System.Drawing.Size(125, 32); + this.lblChoixPhoto.TabIndex = 14; + this.lblChoixPhoto.Text = "Cliquer pour sélectionner une photo"; + this.lblChoixPhoto.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblChoixPhoto.Visible = false; + this.lblChoixPhoto.Click += new System.EventHandler(this.LblChoixPhoto_Click); + // + // lstContact + // + this.lstContact.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.lstContact.FormattingEnabled = true; + this.lstContact.HorizontalScrollbar = true; + this.lstContact.Location = new System.Drawing.Point(6, 19); + this.lstContact.Name = "lstContact"; + this.lstContact.Size = new System.Drawing.Size(318, 329); + this.lstContact.TabIndex = 9; + this.lstContact.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lstContact_DrawItem); + this.lstContact.SelectedIndexChanged += new System.EventHandler(this.LstContact_SelectedIndexChanged); + // + // grbAjout + // + this.grbAjout.Controls.Add(this.radioEntreprise); + this.grbAjout.Controls.Add(this.radioPerso); + this.grbAjout.Controls.Add(this.btnAnnuler); + this.grbAjout.Controls.Add(this.btnAjouter); + this.grbAjout.Controls.Add(this.txtTel); + this.grbAjout.Controls.Add(this.label3); + this.grbAjout.Controls.Add(this.txtPrenom); + this.grbAjout.Controls.Add(this.lblPrenom); + this.grbAjout.Controls.Add(this.txtNom); + this.grbAjout.Controls.Add(this.label1); + this.grbAjout.Location = new System.Drawing.Point(12, 265); + this.grbAjout.Name = "grbAjout"; + this.grbAjout.Size = new System.Drawing.Size(170, 177); + this.grbAjout.TabIndex = 8; + this.grbAjout.TabStop = false; + this.grbAjout.Text = "ajout contact"; + // + // radioEntreprise + // + this.radioEntreprise.AutoSize = true; + this.radioEntreprise.ForeColor = System.Drawing.Color.Green; + this.radioEntreprise.Location = new System.Drawing.Point(98, 101); + this.radioEntreprise.Name = "radioEntreprise"; + this.radioEntreprise.Size = new System.Drawing.Size(72, 17); + this.radioEntreprise.TabIndex = 11; + this.radioEntreprise.TabStop = true; + this.radioEntreprise.Text = "Entreprise"; + this.radioEntreprise.UseVisualStyleBackColor = true; + this.radioEntreprise.CheckedChanged += new System.EventHandler(this.radioEntreprise_CheckedChanged); + // + // radioPerso + // + this.radioPerso.AutoSize = true; + this.radioPerso.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.radioPerso.Location = new System.Drawing.Point(22, 101); + this.radioPerso.Name = "radioPerso"; + this.radioPerso.Size = new System.Drawing.Size(52, 17); + this.radioPerso.TabIndex = 10; + this.radioPerso.TabStop = true; + this.radioPerso.Text = "Perso"; + this.radioPerso.UseVisualStyleBackColor = true; + this.radioPerso.CheckedChanged += new System.EventHandler(this.radioPerso_CheckedChanged); + // + // btnAnnuler + // + this.btnAnnuler.Image = global::Contacts.Properties.Resources.annuler; + this.btnAnnuler.Location = new System.Drawing.Point(115, 126); + this.btnAnnuler.Name = "btnAnnuler"; + this.btnAnnuler.Size = new System.Drawing.Size(45, 45); + this.btnAnnuler.TabIndex = 9; + this.btnAnnuler.UseVisualStyleBackColor = true; + this.btnAnnuler.Click += new System.EventHandler(this.BtnAnnuler_Click); + // + // btnAjouter + // + this.btnAjouter.Image = global::Contacts.Properties.Resources.ajouter; + this.btnAjouter.Location = new System.Drawing.Point(54, 126); + this.btnAjouter.Name = "btnAjouter"; + this.btnAjouter.Size = new System.Drawing.Size(45, 45); + this.btnAjouter.TabIndex = 8; + this.btnAjouter.UseVisualStyleBackColor = true; + this.btnAjouter.Click += new System.EventHandler(this.BtnAjouter_Click); + // + // txtTel + // + this.txtTel.Location = new System.Drawing.Point(54, 75); + this.txtTel.Name = "txtTel"; + this.txtTel.Size = new System.Drawing.Size(106, 20); + this.txtTel.TabIndex = 7; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 78); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(18, 13); + this.label3.TabIndex = 6; + this.label3.Text = "tel"; + // + // txtPrenom + // + this.txtPrenom.Location = new System.Drawing.Point(54, 49); + this.txtPrenom.Name = "txtPrenom"; + this.txtPrenom.Size = new System.Drawing.Size(106, 20); + this.txtPrenom.TabIndex = 5; + // + // lblPrenom + // + this.lblPrenom.AutoSize = true; + this.lblPrenom.Location = new System.Drawing.Point(7, 52); + this.lblPrenom.Name = "lblPrenom"; + this.lblPrenom.Size = new System.Drawing.Size(42, 13); + this.lblPrenom.TabIndex = 4; + this.lblPrenom.Text = "prénom"; + // + // txtNom + // + this.txtNom.Location = new System.Drawing.Point(54, 23); + this.txtNom.Name = "txtNom"; + this.txtNom.Size = new System.Drawing.Size(106, 20); + this.txtNom.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 26); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(27, 13); + this.label1.TabIndex = 0; + this.label1.Text = "nom"; + // + // btnNouveauContact + // + this.btnNouveauContact.Location = new System.Drawing.Point(12, 237); + this.btnNouveauContact.Name = "btnNouveauContact"; + this.btnNouveauContact.Size = new System.Drawing.Size(169, 20); + this.btnNouveauContact.TabIndex = 10; + this.btnNouveauContact.Text = "nouveau contact"; + this.btnNouveauContact.UseVisualStyleBackColor = true; + this.btnNouveauContact.Click += new System.EventHandler(this.btnNouveauContact_Click); + // + // grbContacts + // + this.grbContacts.Controls.Add(this.lstContact); + this.grbContacts.Controls.Add(this.btnSuppr); + this.grbContacts.Controls.Add(this.btnModif); + this.grbContacts.Location = new System.Drawing.Point(188, 12); + this.grbContacts.Name = "grbContacts"; + this.grbContacts.Size = new System.Drawing.Size(333, 430); + this.grbContacts.TabIndex = 15; + this.grbContacts.TabStop = false; + this.grbContacts.Text = "les contacts"; + // + // btnSuppr + // + this.btnSuppr.Image = global::Contacts.Properties.Resources.supprimer; + this.btnSuppr.Location = new System.Drawing.Point(279, 354); + this.btnSuppr.Name = "btnSuppr"; + this.btnSuppr.Size = new System.Drawing.Size(45, 45); + this.btnSuppr.TabIndex = 10; + this.btnSuppr.UseVisualStyleBackColor = true; + this.btnSuppr.Click += new System.EventHandler(this.BtnSuppr_Click); + // + // btnModif + // + this.btnModif.Image = global::Contacts.Properties.Resources.modifier; + this.btnModif.Location = new System.Drawing.Point(228, 354); + this.btnModif.Name = "btnModif"; + this.btnModif.Size = new System.Drawing.Size(45, 45); + this.btnModif.TabIndex = 11; + this.btnModif.UseVisualStyleBackColor = true; + this.btnModif.Click += new System.EventHandler(this.BtnModif_Click); + // + // imgPhoto + // + this.imgPhoto.Enabled = false; + this.imgPhoto.Image = global::Contacts.Properties.Resources.vide; + this.imgPhoto.Location = new System.Drawing.Point(12, 31); + this.imgPhoto.Name = "imgPhoto"; + this.imgPhoto.Size = new System.Drawing.Size(170, 200); + this.imgPhoto.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.imgPhoto.TabIndex = 13; + this.imgPhoto.TabStop = false; + this.imgPhoto.Click += new System.EventHandler(this.ImgPhoto_Click); + // + // frmContacts + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(531, 454); + this.Controls.Add(this.grbContacts); + this.Controls.Add(this.btnNouveauContact); + this.Controls.Add(this.lblChoixPhoto); + this.Controls.Add(this.imgPhoto); + this.Controls.Add(this.grbAjout); + this.Name = "frmContacts"; + this.Text = "Contacts"; + this.Load += new System.EventHandler(this.FrmContacts_Load); + this.grbAjout.ResumeLayout(false); + this.grbAjout.PerformLayout(); + this.grbContacts.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.imgPhoto)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lblChoixPhoto; + private System.Windows.Forms.PictureBox imgPhoto; + private System.Windows.Forms.ListBox lstContact; + private System.Windows.Forms.Button btnModif; + private System.Windows.Forms.Button btnSuppr; + private System.Windows.Forms.GroupBox grbAjout; + private System.Windows.Forms.Button btnAnnuler; + private System.Windows.Forms.Button btnAjouter; + private System.Windows.Forms.TextBox txtTel; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtPrenom; + private System.Windows.Forms.Label lblPrenom; + private System.Windows.Forms.TextBox txtNom; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnNouveauContact; + private System.Windows.Forms.GroupBox grbContacts; + private System.Windows.Forms.RadioButton radioEntreprise; + private System.Windows.Forms.RadioButton radioPerso; + } +} + diff --git a/Contacts/FrmContacts.cs b/Contacts/FrmContacts.cs new file mode 100644 index 0000000..ce305c3 --- /dev/null +++ b/Contacts/FrmContacts.cs @@ -0,0 +1,383 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace Contacts +{ + /// + /// Classe frmContacts + /// Formulaire des contacts + /// + public partial class frmContacts : Form + { + // liste des contacts + private List lesContacts = new List(); + // nom du fichier de sérialisation + private string fichier = "ficcontact"; + + /// + /// Constructeur + /// + public frmContacts() + { + InitializeComponent(); + } + + /// + /// Préparer l'ajout en gérant les objets graphiques + /// + private void DebutAjout() + { + // Gérer les accès aux objets graphiques + grbAjout.Enabled = true; + grbContacts.Enabled = false; + imgPhoto.Enabled = true; + btnNouveauContact.Enabled = false; + lblChoixPhoto.Visible = true; + // désactiver la ligne sélectionnée dans la liste + lstContact.SelectedIndex = -1; + // affiche la photo standard + AffichePhotoStandard(); + // se positionner sur le nom + txtNom.Focus(); + } + + /// + /// Préparer l'après ajout en gérant les objets graphiques + /// + private void FinAjout() + { + // Gérer les accès aux objets graphiques + grbAjout.Enabled = false; + grbContacts.Enabled = true; + imgPhoto.Enabled = false; + btnNouveauContact.Enabled = true; + lblChoixPhoto.Visible = false; + // vider les zones de saisie + txtNom.Text = ""; + txtPrenom.Text = ""; + txtTel.Text = ""; + // se positoinner sur la liste + lstContact.Focus(); + radioPerso.Checked = true; + } + + /// + /// se positionner sur la ligne demandée en paramètre ou la 1e ligne si la liste n'est pas vide + /// + /// ligne à sélectionner + private void PositionDansListe(String ligne) + { + try + { + if (ligne != null) + { + int index = lstContact.FindStringExact(ligne); + lstContact.SelectedIndex = index; + } + else + { + lstContact.SelectedIndex = 0; + } + } + catch + { + lstContact.SelectedIndex = -1; + } + } + + /// + /// Mettre à jour la listbox avec tous les contacts + /// et si demandé, se positionner sur la ligne reçue en paramètre + /// + /// ligne à sélectionner + private void MajListBox(String ligne) + { + // trier la liste + lesContacts.Sort(); + // lier la ListBox avec lesContacts pour la remplir + BindingList bdlContacts = new BindingList(lesContacts); + lstContact.DataSource = bdlContacts; + // si le dictionnaire est vide, mettre la photo vide + if (lesContacts.Count == 0) + { + VidePhoto(); + } + // sauver la liste dans le fichier + Serialise.Sauve(fichier, lesContacts); + // se positionner sur la ligne demandée en paramètre ou la 1e ligne si la liste n'est pas vide + PositionDansListe(ligne); + } + + /// + /// Vider l'affichage de la photo (afficher une photo blanche) + /// + private void VidePhoto() + { + imgPhoto.Image = Properties.Resources.vide; + } + + /// + /// Afficher la photo standard + /// + private void AffichePhotoStandard() + { + imgPhoto.Image = Properties.Resources.standard; + } + + /// + /// Supprimer le contact donc l'index est reçu en paramètre + /// + /// index du contact à supprimer + private void SupprContact(int index) + { + if (index != -1) + { + lesContacts.RemoveAt(index); + MajListBox(null); + } + } + + /// + /// Evénement Click sur le bouton bntSuppr + /// Supprimer le contact sélectionné + /// + /// + /// + private void BtnSuppr_Click(object sender, EventArgs e) + { + // contrôler qu'une ligne est bien sélectionnée + if (lstContact.SelectedIndex != -1) + { + // demander une confirmation de suppression + if (MessageBox.Show("Supprimer le contact ?", "Confirmation", MessageBoxButtons.OKCancel) == DialogResult.OK) + { + // supprimer le contact sélectionné + SupprContact(lstContact.SelectedIndex); + } + } + } + + /// + /// Evénement sélection d'un contact dans la lstContact + /// Charger la photo + /// + /// + /// + private void LstContact_SelectedIndexChanged(object sender, EventArgs e) + { + // si une ligne est sélectionnée + if (lstContact.SelectedIndex != -1) + { + Contact leContact = lesContacts[lstContact.SelectedIndex]; + // afficher l'image + imgPhoto.Image = leContact.getPhoto(); + } + else + { + // affiche une image vide + VidePhoto(); + } + } + + /// + /// Evénement clic sur bouton btnAjouter + /// Ajouter le contact dans la liste + /// + /// + /// + private void BtnAjouter_Click(object sender, EventArgs e) + { + // vérifier que le nom, prénom et tel ne sont pas vides + if (!txtNom.Text.Equals("") && !txtTel.Text.Equals("") && !txtPrenom.Text.Equals("") || radioEntreprise.Checked) + { + // créer le contact et l'ajouter dans la collection + Contact nouveauContact; + if (radioPerso.Checked) + { + nouveauContact = new Contact(txtNom.Text.ToUpper(), txtPrenom.Text, txtTel.Text, imgPhoto.Image); + } + else + { + nouveauContact = new Contact(txtNom.Text.ToUpper(), txtTel.Text, imgPhoto.Image); + } + lesContacts.Add(nouveauContact); + // mettre à jour de la ListBox + MajListBox(nouveauContact.ToString()); + // gérer la fin de l'ajout au niveau des objets graphiques + FinAjout(); + } + else + { + MessageBox.Show("Toutes les zones sont obligatoires"); + } + } + + /// + /// Evénement clic sur le bouton btnModif + /// Supprimer le contact et transférer ces informations dans la zone d'ajout + /// + /// + /// + private void BtnModif_Click(object sender, EventArgs e) + { + // contrôler si un contact est sélectionné + if (lstContact.SelectedIndex != -1) + { + // récupérer l'index du contact + int index = lstContact.SelectedIndex; + // récupérer le contact concerné + Contact leContact = lesContacts[index]; + // supprimer le contact + SupprContact(index); + // remplir les zones d'ajout avec les informations du contact + txtNom.Text = leContact.getNom(); + txtPrenom.Text = leContact.getPrenom(); + txtTel.Text = leContact.getTel(); + // gérer le début de l'ajout au niveau des objets graphiques + DebutAjout(); + // mettre la photo du contact + imgPhoto.Image = leContact.getPhoto(); + } + } + + /// + /// Evénement chargement de frmContacts + /// Préparer les composants et récupérer la sérialisation + /// + /// + /// + private void FrmContacts_Load(object sender, EventArgs e) + { + // préparer les composants graphiques comme pour la fin d'un ajout + FinAjout(); + // récupérer la sauvegarde des contacts, si elle existe + Object recupContacts = Serialise.Recup(fichier); + if (recupContacts != null) + { + lesContacts = (List)recupContacts; + // remplir de la listbox avec les contacts récupérés + MajListBox(null); + } + } + + /// + /// Evénement Click sur le bouton btnAnnuler + /// Annuler la tentative d'ajout + /// + /// + /// + private void BtnAnnuler_Click(object sender, EventArgs e) + { + if (MessageBox.Show("Attention les informations seront perdues.", "Confirmation", MessageBoxButtons.OKCancel) == DialogResult.OK) + { + // gérer la fin de l'ajout au niveau des objets graphiques + FinAjout(); + // mettre à jour la listbox + MajListBox(null); + } + } + + /// + /// Evénement Click sur la photo + /// possibilité de sélectionner une photo + /// + /// + /// + private void ImgPhoto_Click(object sender, EventArgs e) + { + // boite de dialogue pour sélectionner un fichier + OpenFileDialog rechercheFichier; + rechercheFichier = new OpenFileDialog(); + DialogResult choix = rechercheFichier.ShowDialog(); + // si un fichier est sélectionné + if (choix == DialogResult.OK) + { + // récupérer le fichier + string nomFichier = rechercheFichier.FileName; + // tente d'afficher l'image + try + { + imgPhoto.Image = Image.FromFile(nomFichier); + } + catch + { + // erreur le fichier n'est pas une image + MessageBox.Show("Le fichier n'est pas une image"); + } + } + } + + /// + /// Evénement Click sur le label lblChoixPhoto + /// mêmes traitements que le clic sur la photo + /// + /// + /// + private void LblChoixPhoto_Click(object sender, EventArgs e) + { + ImgPhoto_Click(null, null); + } + + /// + /// Evénement Click sur le bouton btnNouveauContact + /// Permettre d'ajouter un contact + /// + /// + /// + private void btnNouveauContact_Click(object sender, EventArgs e) + { + DebutAjout(); + } + + /// + /// Evenement lorsque radioPerso est sélectionné + /// + /// + /// + private void radioPerso_CheckedChanged(object sender, EventArgs e) + { + ChangeTypeContact(); + } + + /// + /// Active/Désactive txtPrenom et lblPrenom selon le choix de l'utilisateur + /// + private void ChangeTypeContact() + { + lblPrenom.Visible = radioPerso.Checked; + txtPrenom.Visible = radioPerso.Checked; + } + + /// + /// Evenement lorsque radioEntreprise est sélectionné + /// + /// + /// + private void radioEntreprise_CheckedChanged(object sender, EventArgs e) + { + ChangeTypeContact(); + } + + private void lstContact_DrawItem(object sender, DrawItemEventArgs e) + { + //Récupérer la couleur du radio correspondant + Color couleur; + e.DrawBackground(); + Contact leContacts = lesContacts[e.Index]; + if (leContacts.IsPersonne()) + { + couleur = radioPerso.ForeColor; + }else + { + couleur = radioEntreprise.ForeColor; + } + Brush brush = new SolidBrush(couleur); + + e.Graphics.DrawString(lstContact.Items[e.Index].ToString(), + e.Font, brush, e.Bounds, StringFormat.GenericDefault); + } + } +} diff --git a/Contacts/FrmContacts.resx b/Contacts/FrmContacts.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Contacts/FrmContacts.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Contacts/Program.cs b/Contacts/Program.cs new file mode 100644 index 0000000..bbe0d81 --- /dev/null +++ b/Contacts/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Contacts +{ + static class Program + { + /// + /// Point d'entrée principal de l'application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmContacts()); + } + } +} diff --git a/Contacts/Properties/AssemblyInfo.cs b/Contacts/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a449518 --- /dev/null +++ b/Contacts/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("Contacts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Contacts")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("7a989ff0-cb51-4312-b11c-5f8476e5a113")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Contacts/Properties/Resources.Designer.cs b/Contacts/Properties/Resources.Designer.cs new file mode 100644 index 0000000..90e3272 --- /dev/null +++ b/Contacts/Properties/Resources.Designer.cs @@ -0,0 +1,133 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace Contacts.Properties { + using System; + + + /// + /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. + /// + // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + // à l'aide d'un outil, tel que ResGen ou Visual Studio. + // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + // avec l'option /str ou régénérez votre projet VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Contacts.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Remplace la propriété CurrentUICulture du thread actuel pour toutes + /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ajouter { + get { + object obj = ResourceManager.GetObject("ajouter", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap annuler { + get { + object obj = ResourceManager.GetObject("annuler", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap modifier { + get { + object obj = ResourceManager.GetObject("modifier", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap playagain { + get { + object obj = ResourceManager.GetObject("playagain", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap standard { + get { + object obj = ResourceManager.GetObject("standard", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap supprimer { + get { + object obj = ResourceManager.GetObject("supprimer", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap vide { + get { + object obj = ResourceManager.GetObject("vide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Contacts/Properties/Resources.resx b/Contacts/Properties/Resources.resx new file mode 100644 index 0000000..f687809 --- /dev/null +++ b/Contacts/Properties/Resources.resx @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\modifier.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\annuler.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\playagain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ajouter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\vide.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\supprimer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Contacts/Properties/Settings.Designer.cs b/Contacts/Properties/Settings.Designer.cs new file mode 100644 index 0000000..10e61d8 --- /dev/null +++ b/Contacts/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Contacts.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Contacts/Properties/Settings.settings b/Contacts/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Contacts/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Contacts/Resources/ajouter.png b/Contacts/Resources/ajouter.png new file mode 100644 index 0000000000000000000000000000000000000000..b7237a21884a78bbb95bc9deca4b8cca2ab3d7d4 GIT binary patch literal 3849 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Vi>1Kof9Xht*t%$rUu)Mx6YEf*Q%h9IXOuw z=u=U?TuJ+XaJ>pEzAWW8NyUAqXF{hSd5)yeQ-xB09eT}?GS8@I#qC=Aqra8BqmnQA zZXn5#{Gt>Tq(W9t-0@*4xvT08GY!z#*!T;7{raC6faf#VbC`s^cKs(mNi30I)siJ7 z4<1A)j7Q4?!w7rh*AzX^4>)@8ARCt~VOVV~a~CZdY$HwUHGR9|uxahuzr6hN%fI-R z4r?Cy_Gf?h(d#~V8zV>V3@R=_rRwY(PzZ!=`osd4T`PY{ZvQ&!>guQ)GoI-1;ZSBn zF$X;zoM>y~L{Eyk^DpGwYwtt?+bhX{!n$4vT{kkey>AJ$Z-NEJn!lT=s}?VQ4>hlImi>B%A_KPk?{D0x_ATR-+%5T%>qvoI`Ep)! zuHi~vaWLj3SFV>=R#H}yr+#_rS5dwS^1?rPUU)#`B&Ge2Yu)GGt2ct@4S|-#Pwd>4|(-U=BsqPReFe^q}9GxkmL@o)2UV|xn0fw z^eMft^p^j4GdSK9Xr=dA+PVDZb+=rq=O6p|4RRd?PQDZjl2h`46o$$GXg?^e2%OL{ zfpqkz-+bUVU;3-#+WYIdO16x8GdSMzJC{>io^IT>=CP&2hsLK}JoVi$aU#Uy5Ex+C z5G{>u?#tl1V2?mAzQ~T|b>wonWZg%;Gk*M}H~+rnk9$!BklGs~eR6W&j_ubUX=|IC z&1P$m>DzW$CYKo69t44vNbSB_5*jw4xxT*sx$4HrtBA#Nud5D!QqceZ#`ga>=>Hl3 XmaoXB;?Bk@00000NkvXXu0mjfEVE21 literal 0 HcmV?d00001 diff --git a/Contacts/Resources/modifier.png b/Contacts/Resources/modifier.png new file mode 100644 index 0000000000000000000000000000000000000000..4108230d317cb32d96d6ffe8948493939f1862d8 GIT binary patch literal 4281 zcmV;q5JvBbP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#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T2%D!*~Gwzk;q`v}na&qekrsjvl?Ib=R&j_qreH z?t|D;QW9w1ym_hJ=bKId;O5Pp4!^(Bw|)ESUJG5Fn|r{KmNtbb3KT*>2mvVl6s@g# zpY`kCbxxRY^-lM+cPH?bl`9t#DItXb00=@r6a~cLm`}W3G%jDRxB`JweKu{{(yKCk zZU6pUwtDp%#pN=I)A?F_#)+Z;rn#LkX75{6w7@ZJnAu~{yy0B38LCe;vYxK$$olNr zYeji^jx8nSMWQItjJLx}30YtNjeG9g&)rLw?CTL|Yv<4(BF(|{Nap;{`aipMWBYt< zNl75GZryt}pRYkt)j1?C)<8jdz&U<|M{|9QEpsnU}W=IMq~F zWe0$?S+h=NmzU>D!w9qH=3PPv+%^ai3HNDHcRJmw_0kgNt0VXP3}m@UWm1QV57}_$zhn*k2Q_Y4giLCn#|R7!zQOf>H)T0LBSOPGDp7=jB`-Rz!-(9YB692 zAq1q9Fbo4yN(jy&=&f@tp<77^e6nEp#Cb;&dSNp6JW;~!eHs}TV2p!O3RP8Opix*U zB{WTgq7XesF zYT*2zpWu~YElu7bAIPkP zJ_6cKE_;iHZ}_+*d7MXqT`p(L;-YXu2-xj*XqwtFC#3{yyuLo^yRW?^qt;{rLxk zmYUOEKq#f~`FvoEbx447j-;fdj_kH)o`svdnQu0ZO6VIga(KoDCJ4BYV2s1EEOD>X`r7xFI-9?=r znsSI+tva(zr#@!+2KV??Uvx`fBEA50#b`V@XU+9(gHCkyzVV~WTL>2~*XcP!`iFbG zYdU%ID{1ffvqctb;jZ|&N( zEA#U5YS2^BnbWH4db!8rIa^p*IHx;Zp|j&Z7nGKkrW6zuyx$vOyUp@?jiw(!KY+fE b;_m?f20Rp!&YLMs00000NkvXXu0mjfX>|<$ literal 0 HcmV?d00001 diff --git a/Contacts/Resources/playagain.png b/Contacts/Resources/playagain.png new file mode 100644 index 0000000000000000000000000000000000000000..9bbd7f45eedba9a2c903e5acbb6f6439c77f66dc GIT binary patch literal 4925 zcmV-D6T<9?P)KLZ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^Og(`b%NdLyH1?b^?5kbqcjGmwuuVy_JGFEk~ z6^w!_7G()(hPZY`@TumMWXdR#VU#;3y_CV=!o-(=m`ma_;^YE8c} zSI`fuuNx`_a9$FT6O+=U2tGSu!dX`2>y&)7nbBcu%f}&OA6eER)0l`Z))NxCWmyI< ziRke6;-$=acEONJ>?To@VfFYZZc0s8{%O z{wvs?y9k^p;6}iO9?pv%&I?<>i8#i9&*rbkZ?b z{lmfJFt=BIKDIaLM;v3oixY3B1X-r!e!siL)ro)H_&4^poq?10!_4UWrMv^Fh%Ml3 zKK%IV#q*OMZ5#64VOf3U`VX!({5V!)m^qjv1xZ3c41$vc2$FdB{)8d~DvE}NQbA8M zpsB&LPY36#ElDpp@Y}~0?;iH0=fdjUI~yI>6mPReySaja&!@$uHhwr~P1%U<4v)=U zTb395okj=et9_6UU9v30!TD^76BPJYZC7-Flj_kRiTA3?yZr7_9LLoW5fAs-@pcn$-3{UL^Y3n!1A< z4_&QW8mlolhWC^r!7uVPy`0ZnnlY>Vo&4wD9CCd-620BjbaZw3*XK$_S)w9+yb6eX zJwwsK(u`ThNEub00000NkvXXu0mjfIdNJ_ literal 0 HcmV?d00001 diff --git a/Contacts/Resources/standard.png b/Contacts/Resources/standard.png new file mode 100644 index 0000000000000000000000000000000000000000..c06c176800252a856c915f01377fb18eb98ba62e GIT binary patch literal 6137 zcmcJT`8$;V_xO=z$TBpOtt^9LMnWMY%P^CD83xHtge=)3LniBxElU!{*k&e6_N_*? zY-Jt$_Aau9N+iN(UO#^SfbS2_``qVwo$FlZKG$`h<&kJ+qRYi0#KFM8z@@K;G^a}n z{qzA?>CeXo;p23{7-+7m%}_OTX@jmXKR_5G7#M0&&;N5~q3i6A^lSnd7`VItJB(Q{ zZea!n{uF&A0`u5mdtsv*gyLuY(bBxzCI)~I6BWd}*U!#IQ~7vD#A@kxc;VfX{lON` zD}gy1RR!ct@>TLDqv4>?337P>d@U$=c-F7|gXQ|yW@m{+6q{!{ZX8*l} zsADTheL`6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{UC`U`Jr89chZc@P z$b@K=wex1vr%xYF7=AI?=4Om^1}D*q4QQbd*}&-_?gbzQExx-jZ%}a+kNx(kE_?8$ zXC8exoRiaPSk|?=VPMB%9S@>Wh(yr4bwepd;JT2L!{rdInudBljg#ZZ0 zVrcO=D1{x3qMIfv5dMN|yXtmCx=b)!v!!I!o72aV>yR#plMLsR$j>7c zje^z_q&v+$;%I|T;PA@#akg$G&v7{3^VqxS4fvuSIq_s#;ssRC7ec4!DO-)S= z1`rE(s1tzIZ@q(v(5G*xdd>`+CiRIJMc6Moq3o`Jk3m+ddU zf}ypcPVF^=+&#& z&Mu#eckDZ0{^OUwn*LnxlVxj2$z~IIuX~}$w5cK!Zkg?hY}tq|wVEwc2A?AD%_^I4^ylLBRlRD) zjV-Uykj*BtFgHiCKfhj9<|w729*tTV3;WuH|zrW<1`%4DySrfG+dFCK#?(-AbWSDaIkW*yA%P-vYy>%9XkE>7m z@Rnb^wmcVU9ok>2OhXc94Ewx(+t&DZVGq6i>eW^GF=^=8L+ZQb$!61%P0v3)<;(g{ zW8WJ=5nvVUE%JuyYZr@()7xk*`S#t3wT~Q?Uix!sPcxKw5vG literal 0 HcmV?d00001 diff --git a/Contacts/Resources/vide.png b/Contacts/Resources/vide.png new file mode 100644 index 0000000000000000000000000000000000000000..2e433c9aed7911d4c55fd244480294447742c4db GIT binary patch literal 664 zcmeAS@N?(olHy`uVBq!ia0vp^tAO|f2OE&A@T$5Dq!^2X+?^QKos)S9a~60+7BevL9RXp+soH$f3=B-Vo-U3d6>)DbZR9;*z;nRB{Qv(uWhVs1 z9Q3Lj&i|HY6|o;(Bd2w9BBb^;0(LS3)Y^S6%#Xo PsfoeU)z4*}Q$iB}>6_Tk literal 0 HcmV?d00001 diff --git a/Contacts/Serialise.cs b/Contacts/Serialise.cs new file mode 100644 index 0000000..7acd117 --- /dev/null +++ b/Contacts/Serialise.cs @@ -0,0 +1,69 @@ +using System; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; + +namespace Contacts +{ + /// + /// Classe Sérialise + /// Permet de sauvegarder en binaire et récupérer des objets + /// + public abstract class Serialise + { + /// + /// Sérialisation + /// + /// nom du fichier de sauvegarde + /// objet à sérialiser + public static void Sauve(string fichier, Object objet) + { + // si le fichier existe, il faut le supprimer + if (File.Exists(fichier)) + { + File.Delete(fichier); + } + // création du flux pour l'écriture dans le fichier + FileStream flux = new FileStream(fichier, FileMode.Create); + // création d'un objet pour le formatage en binaire des informations + BinaryFormatter fbinaire = new BinaryFormatter(); + // sérialisation des objets de la collection + fbinaire.Serialize(flux, objet); + // fermeture du flux + flux.Close(); + } + + /// + /// Désérialisation + /// + /// nom du fichier de sauvegarde + /// objet désérialisé + public static Object Recup(string fichier) + { + // Contrôle de l'existance du fichier + if (File.Exists(fichier)) + { + // ouverture du flux pour la lecture dans le fichier + FileStream flux = new FileStream(fichier, FileMode.Open); + // création d'un objet pour le formatage en binaire des informations + BinaryFormatter fbinaire = new BinaryFormatter(); + // récupération de l'objet sérialisé + try + { + Object objet = fbinaire.Deserialize(flux); + // fermeture du flux + flux.Close(); + // retour de l'objet + return objet; + } + catch + { + return null; + } + } + else + { + return null; + } + } + } +}