private void btnAjouter_Click(object sender, RoutedEventArgs e) { try { PapaJoe.AjouterProgramme(this.txtBxIntitule.Text, new TimeSpan(0, this.Heures, this.Minutes, 0)); } catch (Exception ex) { MessageBox.Show("Exception :\n" + ex.Message); } }
private void btnSauver_Click(object sender, RoutedEventArgs e) { // On envoie si au choix la date sélectionnée n'est pas nulle, ou une date limite est déjà établie if (this.cal.SelectedDate != null || this.ContrainteTraitee.DateLimite != null) { PapaJoe.MiseAJourTache(this.DateCreationTache, new ContrainteTemps() { DateLimite = (DateTime)this.cal.SelectedDate, DelaiUrgence = new TimeSpan(((KeyValuePair <String, int>) this.cmbBxDelai.SelectedItem).Value, 0, 0, 0), Periodicite = (Periodicite)this.cmbBxPeriodicite.SelectedItem }); } }
private void btnAjouterTache_Click(object sender, RoutedEventArgs e) { foreach (Tache tch in this.lstVwListeTaches.SelectedItems) { try { PapaJoe.AjouterTache(tch, this.ProgrammeTraite); } catch (Exception ex) { MessageBox.Show("Exception :\n" + ex.Message); } } }
// METHODES ========================= private void btnSauver_Click(object sender, RoutedEventArgs e) { // Variables de validation ou d'erreur bool ok = true; string errorStr = ""; // Récupération des champs string itl = this.txtBxIntitule.Text; TimeSpan dr = new TimeSpan(0, this.Heures, this.Minutes, 0); // Envoi des champs pour update ou Message d'erreur if (ok) { PapaJoe.MiseAJourProgramme(this.ProgrammeTraite, new Programme(itl, dr)); } else { MessageBox.Show(errorStr); } }
// METHODES ========================= private void btnSauver_Click(object sender, RoutedEventArgs e) { // Variables de validation ou d'erreur bool ok = true; string errorStr = ""; // Récupération des champs string itl = this.txtBxIntitule.Text; TimeSpan dr = new TimeSpan(0, this.Heures, this.Minutes, 0); Statuts stt = (Statuts)this.cmbBxStatut.SelectedValue; string nts = this.txtBxNotes.Text; // Envoi des champs pour update ou Message d'erreur if (ok) { PapaJoe.MiseAJourTache(this.TacheTraitee, new Tache(itl, dr, stt, nts)); } else { MessageBox.Show(errorStr); } }
private void btnRetirer_Click(object sender, RoutedEventArgs e) { PapaJoe.RetirerTaches(this.lstVwListeTaches.SelectedItems, PapaJoe.ListeTachesPrincipale); }
// METHODES ========================= private void btnAjouter_Click(object sender, RoutedEventArgs e) { PapaJoe.CreerTache(this.txtBxIntitule.Text, new TimeSpan(0, this.Heures, this.Minutes, 0)); }
// LANCEMENT DU PROGRAMME ========================= public MainWindow() { InitializeComponent(); // Initialisation automatique PapaJoe.MiseEnPlace(); // Initialisation du contrôleur ReglagesManuels(); // Initialisation des objets }
private void btnDeserialiser_Click(object sender, RoutedEventArgs e) { PapaJoe.DeSerialiserListe(); this.lstVwListeTaches.DataContext = PapaJoe.ListeTachesPrincipale; // Rafraichit la vue. }
// Sauvegarde et chargement seriels XML private void btnSerialiser_Click(object sender, RoutedEventArgs e) { PapaJoe.SerialiserListe(); }
private void btnRetirer_Click(object sender, RoutedEventArgs e) { PapaJoe.RetirerProgrammes(this.lstVwListeProgrammes.SelectedItems); }
private void btnRetirerTache_Click(object sender, RoutedEventArgs e) { PapaJoe.RetirerTaches(this.lstVwTachesProgramme.SelectedItems, this.ProgrammeTraite); }