Esempio n. 1
0
        private void sbar_Scroll(object sender, System.Windows.Controls.Primitives.ScrollEventArgs e)
        {
            timer.Stop();
            int frames = Convert.ToInt32(this.sbar.Value) * FlashPlayer.TotalFrames / Convert.ToInt32(sbar.Maximum);

            FlashPlayer.GotoFrame(frames);
            FlashPlayer.FrameNum = frames;
            FlashPlayer.Play();
            timer.Start();
        }
Esempio n. 2
0
        public void Play(bool primaryMonitor)
        {
            if (!primaryMonitor)
            {
                // Set the same volume for both the left and the right channels
                uint NewVolumeAllChannels = (((uint)0 & 0x0000ffff) | ((uint)0 << 16));

                // Set the volume
                waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);
            }
            else
            {
                if (_muteSound)
                {
                    // Set the same volume for both the left and the right channels
                    uint NewVolumeAllChannels = (((uint)0 & 0x0000ffff) | ((uint)0 << 16));

                    // Set the volume
                    waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);
                }
                else
                {
                    // Set the same volume for both the left and the right channels
                    uint NewVolumeAllChannels = (((uint)_uintCurrentVol & 0x0000ffff) | ((uint)_uintCurrentVol << 16));

                    // Set the volume
                    waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);
                }
            }

            _control.Play();
        }
Esempio n. 3
0
 public override void Play()
 {
     if (flash == null)
     {
         return;
     }
     flash.Play();
 }
Esempio n. 4
0
 public void PlayFlashAnimation(AxShockwaveFlash ObjShockwaveFlash)
 {
     ObjShockwaveFlash.Play();
 }