public LigneScoreCtl(LigneScoreMode mode) { InitializeComponent(); Mode = mode; Configuration conf = new Configuration(); if (Mode == LigneScoreMode.GlobalMinus || Mode == LigneScoreMode.GlobalPlus) { cmbEquipe.Visibility = Visibility.Hidden; cmbPlayer.Visibility = Visibility.Hidden; } else { cmbPlayer.ItemsSource = conf.pseudoListe; cmbEquipe.ItemsSource = conf.equipeListe; } if (Mode == LigneScoreMode.IndivMinus || Mode == LigneScoreMode.GlobalMinus) { this.Background = Brushes.LightSalmon; } else { this.Background = Brushes.LightGreen; } }
public LigneScoreCtl AddLigne(LigneScoreMode m) { LigneScoreCtl ctl = new LigneScoreCtl(m); pnlLignes.Children.Add(ctl); ctl.cmbEquipe.Focus(); return(ctl); }