Exemplo n.º 1
0
        public void AjouterResultatPatineur(PatineurCourse patc, InfoResultatData irpx, int nbPatVag)
        {
            this.ResultatObj.Titre = (string.Format("Heure {2}: Série {0}, Vague {1} : {0}{1}.cl", patc.Serie, patc.Vague, DateTime.Now));
            this.Title             = this.ResultatObj.Titre;
            InfoResultatPatineur irp = null;

            if (irpx != null)
            {
                irp = new InfoResultatPatineur(patc, nbPatVag);
                irp.InfoResultatDataElement = irpx;
                irp.PropertyChanged        += Irp_PropertyChanged;
            }
            else
            {
                irp = new InfoResultatPatineur(patc, nbPatVag);
                irp.PropertyChanged += Irp_PropertyChanged;
            }

            LInfoResultatPatineur.Add(irp.InfoResultatDataElement);
            if (!this.LPatCourse.Contains(patc))
            {
                this.LPatCourse.Add(patc);
            }
            //this.lpatc.Add(patc);
            SpEvenements.Children.Add(irp);

            //if (!string.IsNullOrEmpty(irp.InfoResultatDataElement.TempsSauvegarde)) {
            //    irp.TempsPatineur = irp.InfoResultatDataElement.TempsSauvegarde;
            //}
        }
Exemplo n.º 2
0
 private void AjouterResultatPatineur(PatineurCourse patc)
 {
     this.Evenements     = patc.Evenements;
     this.EvenementSel   = patc.EvenementSel;
     this.NomPatineur    = patc.Patineur.Patineurs;
     this.CasquePatineur = patc.Casque;
     this.ClubPatineur   = patc.Patineur.Club;
     if (this.EvenementSel == null)
     {
         EvenementPatineur ep; // = patc.Evenements.SingleOrDefault(z => z.Temps == patc.Temps);
         EvenementPatineur dep = patc.Evenements.LastOrDefault(z => z.Evenement == "DEP");
         EvenementPatineur fin = patc.Evenements.LastOrDefault(z => z.Evenement == "FIN");
         int idxd = patc.Evenements.IndexOf(dep);
         int idxf = patc.Evenements.IndexOf(fin);
         ep = dep;
         if (idxf > idxd)
         {
             ep = patc.Evenements[idxf];
         }
         if (ep != null)
         {
             this.EvenementSel = ep;
         }
     }
 }
Exemplo n.º 3
0
 public InfoResultatPatineur(PatineurCourse patc, int nbPatVag)
 {
     InitializeComponent();
     this.DataContext             = this;
     this.InfoResultatDataElement = new InfoResultatData();
     this.InfoResultatDataElement.PropertyChanged += InfoResultatDataElement_PropertyChanged;
     this.RangPossibles = new ObservableCollection <int>();
     for (int i = 1; i <= nbPatVag; i++)
     {
         this.RangPossibles.Add(i);
     }
     this.AjouterResultatPatineur(patc);
     this.NotifierChangementPropriete("NomPatineur");
     this.NotifierChangementPropriete("CasquePatineur");
     this.NotifierChangementPropriete("ClubPatineur");
 }