Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1.     private void timerApplication_Tick(object sender, EventArgs e)
  2.         {
  3.             backgroundWorkerAvionSpawn.RunWorkerAsync();
  4.             UpdateAffichage();
  5.         }
  6.    
  7.     private void UpdateAffichage()
  8.     {
  9.         UpdateAffichageListeAttente();
  10.     }
  11.    
  12.     /// <summary>
  13.         /// Mets l'affichage de la liste d'attente à jour
  14.         /// </summary>
  15.     private void UpdateAffichageListeAttente()
  16.         {
  17.             listViewAttenteAtterissage.Clear();
  18.  
  19.             this.listViewAttenteAtterissage.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
  20.             this.columnNoVol,
  21.             this.columnNombrePassager,
  22.             this.columnCarburant});
  23.  
  24.             PetitAvion[] liste = PierreEliotTrudeau.ListeAttente.ToArray<VehiculeVolant>();
  25.             Array.Sort(liste);
  26.            
  27.  
  28.             for (int i = 0; i < liste.Count(); i++)
  29.             {
  30.                 ListViewItem item1 = new ListViewItem(new string[] { liste[i].NoVol.ToString(), liste[i].NombrePassagers.ToString(), liste[i].QuantiteFuel.ToString() }, -1);
  31.                 listViewAttenteAtterissage.Items.Add(item1);
  32.             }
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement