Exemplo n.º 1
0
 private void BindAudio()
 {
     if (Environment.OSVersion.Version.Major < 6)
     {
         // Version is 5 or less, XP or Windows Server 2k3 perhaps?
         vol = new VolumeDetectorXP();
     }
     else
     {
         // Vista on up
         vol = new VolumeDetectorVista();
     }
     vol.RegisterCallback(this.AudioChanged);
 }
Exemplo n.º 2
0
        private void frmDisplay_Load(object sender, EventArgs e)
        {
            if (Environment.OSVersion.Version.Major < 6)
            {
                // Version is 5 or less, XP or Windows Server 2k3 perhaps?
                vol = new VolumeDetectorXP();
            }
            else
            {
                // Vista on up
                vol = new VolumeDetectorVista();
            }



            vol.RegisterCallback(this.AudioChanged);
        }