Volume Control
Application-specific hotkeys for Windows
|
Manages multiple "selected" audio sessions for a given CoreAudio.AudioSessionManager instance. More...
Public Member Functions | |
AudioSessionMultiSelector (AudioSessionManager audioSessionManager) | |
Creates a new AudioSessionMultiSelector instance for the specified audioSessionManager . More... | |
bool | GetSessionIsSelected (AudioSession audioSession) |
Gets whether the specified audioSession is selected or not. More... | |
void | SetSessionIsSelected (AudioSession audioSession, bool isSelected) |
Sets whether the specified audioSession is selected or not. More... | |
void | SetSessionIsSelected (int index, bool isSelected) |
Sets whether the AudioSession at the specified index is selected or not. More... | |
void | SetAllSessionSelectionStates (bool isSelected) |
Sets whether all AudioSession instances in the Sessions list are selected or not. More... | |
void | SetSelectedSessions (params AudioSession[] sessions) |
Sets only the specified sessions as selected. More... | |
void | SetSelectedSessions (IEnumerable< AudioSession > sessions) |
void | SetSelectedSessionsOrCurrentSession (params AudioSession[] sessions) |
Sets only the specified sessions as selected, unless sessions contains exactly 1 session in which case the CurrentSession is set and all sessions are deselected. More... | |
void | SetSelectedSessionsOrCurrentSession (IEnumerable< AudioSession > sessions) |
void | ClearSelectedSessions () |
Unselects all SelectedSessions. More... | |
void | SelectCurrentItem () |
Selects the CurrentItem. More... | |
void | DeselectCurrentItem () |
Deselects the CurrentItem. More... | |
void | ToggleSelectCurrentItem () |
Toggles whether the CurrentItem is selected. More... | |
void | IncrementCurrentIndex () |
Increments the CurrentIndex by 1, looping back around to 0 when it exceeds the length of the Sessions list. More... | |
void | DecrementCurrentIndex () |
Decrements the CurrentIndex by 1, looping back around to the length of the Sessions list when it goes past 0. More... | |
void | UnsetCurrentIndex () |
Sets the CurrentIndex to 0. More... | |
Properties | |
IReadOnlyList< bool > | SelectionStates [get, set] |
IReadOnlyList< AudioSession > | SelectedSessions [get, set] |
Gets or sets the list of selected AudioSession instances. More... | |
bool | HasSelectedSessions [get] |
Gets whether there are any selected sessions or not. More... | |
int? | CurrentIndex [get, set] |
bool | LockCurrentIndex [get, set] |
AudioSession?? | CurrentSession [get, set] |
Gets or sets the session that the selector is currently pointing at. More... | |
bool | LockSelection [get, set] |
bool | LockCurrentIndexOnLockSelection [get, set] |
Gets or sets whether the LockCurrentIndex property is also set when LockSelection is changed. More... | |
Properties inherited from VolumeControl.CoreAudio.Interfaces.IAudioMultiSelector | |
IReadOnlyList< bool > | SelectionStates [get, set] |
Gets or sets the selection state of each AudioSession instance in the Sessions list. More... | |
int | CurrentIndex [get, set] |
Gets or sets the current index of the selector in the Sessions list. More... | |
bool | LockCurrentIndex [get, set] |
Gets or sets whether the CurrentIndex can be changed. More... | |
bool | LockSelection [get, set] |
Gets or sets whether the selected items can be changed. More... | |
Events | |
PropertyChangedEventHandler? | PropertyChanged |
EventHandler< AudioSession >? | SessionSelected |
Occurs when a session is selected for any reason. More... | |
EventHandler< AudioSession >? | SessionDeselected |
Occurs when a session is deselected for any reason. More... | |
EventHandler< AudioSession?>? | CurrentSessionChanged |
Occurs when the CurrentItem is changed for any reason. More... | |
PreviewSessionIsSelectedEventHandler? | PreviewSessionIsSelected |
Occurs prior to a new session being added, allowing handlers to determine if it should be selected by default. More... | |
Manages multiple "selected" audio sessions for a given CoreAudio.AudioSessionManager instance.
VolumeControl.CoreAudio.AudioSessionMultiSelector.AudioSessionMultiSelector | ( | AudioSessionManager | audioSessionManager | ) |
Creates a new AudioSessionMultiSelector instance for the specified audioSessionManager .
audioSessionManager | An CoreAudio.AudioSessionManager instance to select from. |
References VolumeControl.CoreAudio.AudioSessionManager.AddedSessionToList, VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, and VolumeControl.CoreAudio.AudioSessionManager.RemovingSessionFromList.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.ClearSelectedSessions | ( | ) |
Unselects all SelectedSessions.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.DecrementCurrentIndex | ( | ) |
Decrements the CurrentIndex by 1, looping back around to the length of the Sessions list when it goes past 0.
Does nothing when LockCurrentIndex is true
.
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, VolumeControl.CoreAudio.AudioSessionMultiSelector.LockCurrentIndex, and VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectionStates.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.DeselectCurrentItem | ( | ) |
Deselects the CurrentItem.
Does nothing when LockSelection is true
or CurrentIndex is -1.
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentSession, and VolumeControl.CoreAudio.AudioSessionMultiSelector.LockSelection.
bool VolumeControl.CoreAudio.AudioSessionMultiSelector.GetSessionIsSelected | ( | AudioSession | audioSession | ) |
Gets whether the specified audioSession is selected or not.
audioSession | An AudioSession instance. |
true
when the audioSession is selected; otherwise false
.ArgumentException | The specified audioSession does not exist in the AudioSessionManager. |
References VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectionStates.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.IncrementCurrentIndex | ( | ) |
Increments the CurrentIndex by 1, looping back around to 0 when it exceeds the length of the Sessions list.
Does nothing when LockCurrentIndex is true
.
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, VolumeControl.CoreAudio.AudioSessionMultiSelector.LockCurrentIndex, and VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectionStates.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectCurrentItem | ( | ) |
Selects the CurrentItem.
Does nothing when LockSelection is true
or CurrentIndex is -1.
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentSession, and VolumeControl.CoreAudio.AudioSessionMultiSelector.LockSelection.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.SetAllSessionSelectionStates | ( | bool | isSelected | ) |
Sets whether all AudioSession instances in the Sessions list are selected or not.
isSelected | true selects the sessions; false deselects the sessions. |
References VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectionStates, and VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSessionIsSelected().
Referenced by VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessionsOrCurrentSession().
void VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessions | ( | params AudioSession[] | sessions | ) |
Sets only the specified sessions as selected.
sessions | Any number of audio sessions. |
References VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectionStates, and VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSessionIsSelected().
Referenced by VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessionsOrCurrentSession().
void VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessionsOrCurrentSession | ( | params AudioSession[] | sessions | ) |
Sets only the specified sessions as selected, unless sessions contains exactly 1 session in which case the CurrentSession is set and all sessions are deselected.
sessions | Any number of audio sessions. |
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentSession, VolumeControl.CoreAudio.AudioSessionMultiSelector.SetAllSessionSelectionStates(), and VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessions().
void VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSessionIsSelected | ( | AudioSession | audioSession, |
bool | isSelected | ||
) |
Sets whether the specified audioSession is selected or not.
audioSession | An AudioSession instance. |
isSelected | true selects the audioSession ; false deselects the audioSession . |
ArgumentException | The specified audioSession does not exist in the AudioSessionManager. |
Referenced by VolumeControl.CoreAudio.AudioSessionMultiSelector.SetAllSessionSelectionStates(), and VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessions().
void VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSessionIsSelected | ( | int | index, |
bool | isSelected | ||
) |
Sets whether the AudioSession at the specified index is selected or not.
index | The zero-based index of the AudioSession instance to (de)select. |
isSelected | true selects the session; false deselects the session. |
ArgumentOutOfRangeException | The specified index is out-of-range of the Sessions list. |
void VolumeControl.CoreAudio.AudioSessionMultiSelector.ToggleSelectCurrentItem | ( | ) |
Toggles whether the CurrentItem is selected.
Does nothing when LockSelection is true
or CurrentIndex is -1.
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentSession, VolumeControl.CoreAudio.AudioSessionMultiSelector.LockSelection, and VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectionStates.
void VolumeControl.CoreAudio.AudioSessionMultiSelector.UnsetCurrentIndex | ( | ) |
Sets the CurrentIndex to 0.
Does nothing when LockCurrentIndex is true
.
References VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentIndex, and VolumeControl.CoreAudio.AudioSessionMultiSelector.LockCurrentIndex.
|
getset |
Gets or sets the session that the selector is currently pointing at.
Referenced by VolumeControl.CoreAudio.AudioSessionMultiSelector.DeselectCurrentItem(), VolumeControl.CoreAudio.AudioSessionMultiSelector.SelectCurrentItem(), VolumeControl.CoreAudio.AudioSessionMultiSelector.SetSelectedSessionsOrCurrentSession(), and VolumeControl.CoreAudio.AudioSessionMultiSelector.ToggleSelectCurrentItem().
|
get |
Gets whether there are any selected sessions or not.
true
when there is at least one selected session; otherwise false
.
|
getset |
Gets or sets whether the LockCurrentIndex property is also set when LockSelection is changed.
|
getset |
Gets or sets the list of selected AudioSession instances.
EventHandler<AudioSession?>? VolumeControl.CoreAudio.AudioSessionMultiSelector.CurrentSessionChanged |
Occurs when the CurrentItem is changed for any reason.
PreviewSessionIsSelectedEventHandler? VolumeControl.CoreAudio.AudioSessionMultiSelector.PreviewSessionIsSelected |
Occurs prior to a new session being added, allowing handlers to determine if it should be selected by default.
EventHandler<AudioSession>? VolumeControl.CoreAudio.AudioSessionMultiSelector.SessionDeselected |
Occurs when a session is deselected for any reason.
EventHandler<AudioSession>? VolumeControl.CoreAudio.AudioSessionMultiSelector.SessionSelected |
Occurs when a session is selected for any reason.