mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
xy and fx parameters added to strip/bus classes.
GetType, GetVersion, SendText added to Remote class. Console output now written to Debug stream. ToString() method overriden for higher classes. formatter run through all files.
This commit is contained in:
@@ -2,40 +2,44 @@
|
||||
|
||||
class Special {
|
||||
# Constructor
|
||||
Special() {
|
||||
Special () {
|
||||
AddActionMembers -PARAMS @('restart', 'shutdown', 'show')
|
||||
}
|
||||
|
||||
[Single] Getter($cmd) {
|
||||
[string] ToString() {
|
||||
return $this.GetType().Name
|
||||
}
|
||||
|
||||
[single] Getter ($cmd) {
|
||||
return Param_Get -PARAM $cmd -IS_STRING $false
|
||||
}
|
||||
|
||||
[void] Setter($param, $val) {
|
||||
[void] Setter ($param, $val) {
|
||||
if ($val -is [Boolean]) {
|
||||
Param_Set -PARAM $param -VALUE $(if ($val) { 1 } else { 0 })
|
||||
Param_Set -PARAM $param -Value $(if ($val) { 1 } else { 0 })
|
||||
}
|
||||
else {
|
||||
Param_Set -PARAM $param -VALUE $val
|
||||
Param_Set -PARAM $param -Value $val
|
||||
}
|
||||
}
|
||||
|
||||
[String] cmd ($arg) {
|
||||
[string] cmd ($arg) {
|
||||
return "Command.$arg"
|
||||
}
|
||||
|
||||
hidden $_hide = $($this | Add-Member ScriptProperty 'hide' `
|
||||
{
|
||||
$this._hide = $this.Setter($this.cmd('show'), $false)
|
||||
}`
|
||||
} `
|
||||
{}
|
||||
)
|
||||
|
||||
hidden $_showvbanchat = $($this | Add-Member ScriptProperty 'showvbanchat' `
|
||||
{
|
||||
$this.Getter($this.cmd('DialogShow.VBANCHAT'))
|
||||
}`
|
||||
} `
|
||||
{
|
||||
param( [bool]$arg )
|
||||
param([bool]$arg)
|
||||
$this._showvbanchat = $this.Setter($this.cmd('DialogShow.VBANCHAT'), $arg)
|
||||
}
|
||||
)
|
||||
@@ -43,14 +47,14 @@ class Special {
|
||||
hidden $_lock = $($this | Add-Member ScriptProperty 'lock' `
|
||||
{
|
||||
$this._lock = $this.Getter($this.cmd('lock'))
|
||||
}`
|
||||
} `
|
||||
{
|
||||
param( [bool]$arg )
|
||||
param([bool]$arg)
|
||||
$this._lock = $this.Setter($this.cmd('lock'), $arg)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Function Make_Command {
|
||||
function Make_Command {
|
||||
return [Special]::new()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user