/// <summary> /// Click event of import_button object. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Import_button_Click(object sender, EventArgs e) { Console.WriteLine("[Debug: Bacchus.view.ImportView.Import_button_Click] Importation"); if (IsLoading) { Manager.AdvertBox("Une importation est déjà en cours d'exécution.", "erreur"); } else if (this.Filename != null) { switch (this.Import_type_comboBox.SelectedIndex) { case 0: IsLoading = true; Manager.Import_Add(this.Filename, this.progressBar); break; case 1: IsLoading = true; Manager.ConfirmationEraseBox(this.Filename, this.progressBar); break; default: Manager.AdvertBox("Vous devez sélectionner un type d'import.", "information"); break; } } else { Manager.AdvertBox("Vous devez sélectionner un fichier CSV.", "information"); } }