Пример #1
0
 public FormAjout(Usine usine)
 {
     InitializeComponent();
     this.rdButton_Foot.CheckedChanged  += new EventHandler(rdButton_Foot_CheckedChanged);
     this.rdButton_Golf.CheckedChanged  += new EventHandler(rdButton_Foot_CheckedChanged);
     this.rdButton_Voile.CheckedChanged += new EventHandler(rdButton_Foot_CheckedChanged);
     this.usine = usine;
     updateComboBox();
     disabledControls();
 }
Пример #2
0
 public Sport()
 {
     InitializeComponent();
     usine = new Usine();
     usine.addArticle(new BallonFoot(541, "Ballon", "rond", new Matiere("Plastique", 50), new Matiere("Fer", 120)));
     usine.addArticle(new ClubGolf(894, "Club de golf", "Carotte", new Matiere("Fer", 120), 41));
     usine.addArticle(new PlancheVoile(412, "Planche à voile", "Rectangulaire", new Matiere("Plastique", 50), new Matiere("Caoutchouc", 45), new Matiere("Placo", 568)));
     this.listBox_Article.DisplayMember       = "getArticle";
     this.listBox_Article.DataSource          = usine.contenuArticle();
     this.listBox_Article.FormattingEnabled   = true;
     this.listBox_Article.HorizontalScrollbar = true;
     this.listBox_Article.ScrollAlwaysVisible = true;
     this.listBox_Article.MultiColumn         = false;
 }