From b5546aa56ccd3c95b5a55818d97bfb365d1b2bb5 Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:40:04 -0500 Subject: [PATCH] existing to methods prelim manual testing passes for potato --- README.md | 11 +++++------ lib/command.ps1 | 39 ++++++++++++++------------------------- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 8adc862..9994d31 100644 --- a/README.md +++ b/README.md @@ -418,15 +418,14 @@ $vmr.vban.outstream[3].bit = 16 Certain 'special' commands are defined by the API as performing actions rather than setting values. -The following commands are available: - -- hide -- showvbanchat: bool, (write only) -- lock: bool, (write only) - The following methods are available: - Show() +- Hide() +- Lock() +- Unlock() +- ShowVBANChat() +- HideVBANChat() - Restart() - Shutdown() - Load($filepath): string diff --git a/lib/command.ps1 b/lib/command.ps1 index 4f1e3c3..a8f412d 100644 --- a/lib/command.ps1 +++ b/lib/command.ps1 @@ -1,6 +1,6 @@ class Special : IRemote { Special ([Object]$remote) : base ($remote) { - AddActionMembers -PARAMS @('restart', 'shutdown', 'show') + AddActionMembers -PARAMS @('restart', 'shutdown', 'show', 'lock') } [string] identifier () { @@ -17,32 +17,21 @@ class Special : IRemote { Stop-Process -Name 'VoicemeeterMacroButtons' } - hidden $_hide = $($this | Add-Member ScriptProperty 'hide' ` - { - $this._hide = $this.Setter('show', $false) - } ` - {} - ) + [void] Hide () { + $this.Setter('show', $false) + } - hidden $_showvbanchat = $($this | Add-Member ScriptProperty 'showvbanchat' ` - { - $this.Getter('DialogShow.VBANCHAT') - } ` - { - param([bool]$arg) - $this._showvbanchat = $this.Setter('DialogShow.VBANCHAT', $arg) - } - ) + [void] Unlock () { + $this.Setter('lock', $false) + } - hidden $_lock = $($this | Add-Member ScriptProperty 'lock' ` - { - $this._lock = $this.Getter('lock') - } ` - { - param([bool]$arg) - $this._lock = $this.Setter('lock', $arg) - } - ) + [void] ShowVBANChat () { + $this.Setter('DialogShow.VBANCHAT', $true) + } + + [void] HideVBANChat () { + $this.Setter('DialogShow.VBANCHAT', $false) + } [void] Load ([string]$filename) { $this.Setter('load', $filename)