private void BindSounds() { if (_soundFactory == null) { comboBox1.DataSource = null; return; } int length = _soundFactory.GetLength <Sound>(); List <ListItem <Sound> > sounds = new List <ListItem <Sound> >(); for (int i = 0; i < length; i++) { var sound = _soundFactory.GetSound <Sound>(i); if (sound == null) { continue; } var listItem = new ListItem <Sound>() { Value = sound, DisplayName = sound.Name }; sounds.Add(listItem); } comboBox1.DataSource = sounds; comboBox1.DisplayMember = "DisplayName"; comboBox1.ValueMember = "Value"; }
public void TestSoundFactory() { var factory = new SoundFactory(Install, Container); var sound = factory.GetSound <Sound>(1); Guard.RequireIsNotNull(sound, "Sound was not created."); sound.Play(); }
public void TestSoundFactory() { var factory = new SoundFactory(Install, Container); var sound = factory.GetSound<Sound>(1); Guard.RequireIsNotNull(sound, "Sound was not created."); sound.Play(); }
public void TestSoundFactory() { SoundFactory factory = new SoundFactory(Install, Container); Sound sound = factory.GetSound <Sound>(1); Guard.AssertIsNotNull(sound, "Sound was not created."); sound.Play(); }
public void TestSoundFactory() { SoundFactory factory = new SoundFactory(Install, Container); Sound sound = factory.GetSound<Sound>(1); Guard.AssertIsNotNull(sound, "Sound was not created."); sound.Play(); }