mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
command
implement iremote
This commit is contained in:
parent
09d8bd48eb
commit
eeb30925fa
@ -1,33 +1,12 @@
|
||||
class Special {
|
||||
[Object]$remote
|
||||
|
||||
class Special : IRemote {
|
||||
Special ([Object]$remote) {
|
||||
AddActionMembers -PARAMS @('restart', 'shutdown', 'show')
|
||||
|
||||
$this.remote = $remote
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
return 'Command'
|
||||
}
|
||||
|
||||
[string] ToString() {
|
||||
return $this.GetType().Name
|
||||
}
|
||||
|
||||
[single] Getter ($param) {
|
||||
return $this.remote.Getter("$($this.identifier()).$param")
|
||||
}
|
||||
|
||||
[void] Setter ($param, $val) {
|
||||
if ($val -is [Boolean]) {
|
||||
$this.remote.Setter("$($this.identifier()).$param", $(if ($val) { 1 } else { 0 }))
|
||||
}
|
||||
else {
|
||||
$this.remote.Setter("$($this.identifier()).$param", $val)
|
||||
}
|
||||
}
|
||||
|
||||
[void] RunMacrobuttons() {
|
||||
'Launching the MacroButtons app' | Write-Verbose
|
||||
Start-Process -FilePath $(Join-Path -Path $this.remote.vmpath -ChildPath 'VoicemeeterMacroButtons.exe')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user