Esempio n. 1
0
        private void programGroupList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (programGroupList.SelectedItem != null)
            {
                this.infoBox.Visible = true;
                programBox.Name      = programGroupList.SelectedItem.ToString();
                programBox.Text      = programGroupList.SelectedItem.ToString();

                programsInGroupList.Items.Clear();

                /*foreach (ProgramGroup group in Program.PGM.programGroups)
                 * {
                 *  group.updateActiveSessions();
                 * }*/
                foreach (AudioSession session in Program.PGM.programGroups.ElementAt(programGroupList.SelectedIndex).loadedAudioSessions)
                {
                    programsInGroupList.Items.Add(session.Process.ProcessName);
                }

                //*****display hotkey Box
                ProgramGroup targetGroup = Program.PGM.getProgramGroup(programGroupList.SelectedIndex);

                //display volume
                this.curVolume.Text = targetGroup.getVolume().ToString() + "%";


                //display currently binded hotkeys
                checkBoxCTRL.Checked = false;
                checkBoxALT.Checked  = false;
                checkBoxWIN.Checked  = false;
                if (targetGroup.hasHotkey)
                {
                    foreach (string modifiers in targetGroup.mods)
                    {
                        switch (modifiers)
                        {
                        case "Ctrl":
                            checkBoxCTRL.Checked = true;
                            break;

                        case "Alt":
                            checkBoxALT.Checked = true;
                            break;

                        case "Win":
                            checkBoxWIN.Checked = true;
                            break;
                        }
                    }
                    this.volUpHotkey.Text   = targetGroup.getVolumeUpHotkey();
                    this.volDownHotkey.Text = targetGroup.getVolumeDownHotkey();
                }
                else
                {
                    this.volUpHotkey.Text   = "None Binded";
                    this.volDownHotkey.Text = "None Binded";
                }
            }
        }
Esempio n. 2
0
 private void updateDisplayedVolume()
 {
     if (programGroupList.SelectedItem != null)
     {
         ProgramGroup targetGroup = Program.PGM.getProgramGroup(programGroupList.SelectedIndex);
         this.curVolume.Text = targetGroup.getVolume().ToString() + "%";
     }
 }