예제 #1
0
        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";
        }
예제 #2
0
        public void TestSoundFactory()
        {
            var factory = new SoundFactory(Install, Container);
            var sound   = factory.GetSound <Sound>(1);

            Guard.RequireIsNotNull(sound, "Sound was not created.");

            sound.Play();
        }
예제 #3
0
        public void TestSoundFactory()
        {
            var factory = new SoundFactory(Install, Container);
            var sound = factory.GetSound<Sound>(1);

            Guard.RequireIsNotNull(sound, "Sound was not created.");

            sound.Play();
        }
예제 #4
0
        public void TestSoundFactory()
        {
            SoundFactory factory = new SoundFactory(Install, Container);
            Sound        sound   = factory.GetSound <Sound>(1);

            Guard.AssertIsNotNull(sound, "Sound was not created.");

            sound.Play();
        }
예제 #5
0
        public void TestSoundFactory()
        {
            SoundFactory factory = new SoundFactory(Install, Container);
            Sound sound = factory.GetSound<Sound>(1);

            Guard.AssertIsNotNull(sound, "Sound was not created.");

            sound.Play();
        }