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);
     }
 }
Exemple #2
0
 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
         });
     }
 }
Exemple #3
0
 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);
         }
     }
 }
Exemple #4
0
        // 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);
            }
        }
Exemple #5
0
        // 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);
            }
        }
Exemple #6
0
 private void btnRetirer_Click(object sender, RoutedEventArgs e)
 {
     PapaJoe.RetirerTaches(this.lstVwListeTaches.SelectedItems, PapaJoe.ListeTachesPrincipale);
 }
Exemple #7
0
 // METHODES =========================
 private void btnAjouter_Click(object sender, RoutedEventArgs e)
 {
     PapaJoe.CreerTache(this.txtBxIntitule.Text, new TimeSpan(0, this.Heures, this.Minutes, 0));
 }
Exemple #8
0
 // LANCEMENT DU PROGRAMME =========================
 public MainWindow()
 {
     InitializeComponent(); // Initialisation automatique
     PapaJoe.MiseEnPlace(); // Initialisation du contrôleur
     ReglagesManuels();     // Initialisation des objets
 }
Exemple #9
0
 private void btnDeserialiser_Click(object sender, RoutedEventArgs e)
 {
     PapaJoe.DeSerialiserListe();
     this.lstVwListeTaches.DataContext = PapaJoe.ListeTachesPrincipale; // Rafraichit la vue.
 }
Exemple #10
0
 // 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);
 }
Exemple #12
0
 private void btnRetirerTache_Click(object sender, RoutedEventArgs e)
 {
     PapaJoe.RetirerTaches(this.lstVwTachesProgramme.SelectedItems, this.ProgrammeTraite);
 }