private void toolStripButtonDownload_Click(object sender, EventArgs e) { if (ApplicationDeployment.IsNetworkDeployed) { InputBoxResult ibr = InputBox.Show("Entrez le nom du groupe de photos:", "Vérification"); if (ibr.ReturnCode != System.Windows.Forms.DialogResult.OK) { return; } // ne faisons pas trop compliqué... if (ibr.Text.ToLower() != "barbaggio") { return; } //ApplicationDeployment.CurrentDeployment.DownloadFileGroup("Famille"); FormDownload.Download("Famille", false); if (Properties.Settings.Default.PhotosSupp == null) { Properties.Settings.Default.PhotosSupp = new System.Collections.Specialized.StringCollection(); } Properties.Settings.Default.PhotosSupp.Add("Famille"); Properties.Settings.Default.Save(); Enfants.Recharge(); FormEnfants_Load(null, null); // recharge le listView } }
private void FormCalculs_Load(object sender, EventArgs e) { this.Text = Application.ProductName; /* * if (DateTime.Now.CompareTo(new DateTime(2012, 07, 1)) > 0) * { * MessageBox.Show("L'application est périmée. Obtenez une mise à jour auprès de l'auteur ou téléchargez la dernière version.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Stop); * * if (ApplicationDeployment.IsNetworkDeployed) * { * miseÀJourToolStripMenuItem_Click(null, EventArgs.Empty); * } * * this.Close(); * return; * } */ if (ApplicationDeployment.IsNetworkDeployed) { miseAJourToolStripMenuItem.Enabled = true; //miseÀJourToolStripMenuItem.ToolTipText = string.Format("Dernière recherche: {0}", ApplicationDeployment.CurrentDeployment.TimeOfLastUpdateCheck); this.Text += string.Format(" - version {0}", ApplicationDeployment.CurrentDeployment.CurrentVersion); if (ApplicationDeployment.CurrentDeployment.IsFirstRun) { MessageBox.Show(@"Merci d'utiliser CalculsCE1 ! Le chronomètre et l'étoile récompensent les plus rapides. Nouveau module pour apprendre l'écriture des nombres en français. Contrôle hebdomadaire des mises à jour en tâche de fond ou avec le menu. Le bouton + permet de gérer la liste des prénoms et photos.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information); // recharge les photos en ressources le cas échéant if (Properties.Settings.Default.PhotosSupp != null) { foreach (var i in Properties.Settings.Default.PhotosSupp) { FormDownload.Download(i, true); } } } } else { miseAJourToolStripMenuItem.Enabled = false; } Historique.Add(DateTime.Now.ToString()); }