C# Class SoundSwitch.Model.AppModel

Inheritance: IAppModel
Datei anzeigen Open project: Belphemur/SoundSwitch

Public Methods

Method Description
CycleActiveDevice ( AudioDeviceType type ) : bool

Cycles the active device to the next device. Returns true if succesfully switched (at least as far as we can tell), returns false if could not successfully switch. Throws NoDevicesException if there are no devices configured.

InitializeMain ( ) : void

Initialize the Main class with Updater and Hotkeys

SelectDevice ( IAudioDevice device ) : bool

Add the device to the Selected device list

SetActiveDevice ( IAudioDevice device ) : bool

Attempts to set active device to the specified name

SetHotkeyCombination ( HotKeys hotkeys, AudioDeviceType deviceType ) : bool
UnselectDevice ( IAudioDevice device ) : bool

Add the device to the Selected device list

Private Methods

Method Description
AppModel ( ) : System
HandleHotkeyPress ( object sender, WindowsAPIAdapter e ) : void
InitUpdateChecker ( ) : void
MigrateSelectedDeviceLists ( ) : void
RegisterForRestart ( ) : void
RegisterRecovery ( ) : void
SaveState ( object state ) : int

Method Details

CycleActiveDevice() public method

Cycles the active device to the next device. Returns true if succesfully switched (at least as far as we can tell), returns false if could not successfully switch. Throws NoDevicesException if there are no devices configured.
public CycleActiveDevice ( AudioDeviceType type ) : bool
type AudioDeviceType
return bool

InitializeMain() public method

Initialize the Main class with Updater and Hotkeys
public InitializeMain ( ) : void
return void

SelectDevice() public method

Add the device to the Selected device list
public SelectDevice ( IAudioDevice device ) : bool
device IAudioDevice
return bool

SetActiveDevice() public method

Attempts to set active device to the specified name
public SetActiveDevice ( IAudioDevice device ) : bool
device IAudioDevice
return bool

SetHotkeyCombination() public method

public SetHotkeyCombination ( HotKeys hotkeys, AudioDeviceType deviceType ) : bool
hotkeys HotKeys
deviceType AudioDeviceType
return bool

UnselectDevice() public method

Add the device to the Selected device list
public UnselectDevice ( IAudioDevice device ) : bool
device IAudioDevice
return bool