(action: IPresetCommand, p?: any)
| 19 | } |
| 20 | |
| 21 | async execPreset(action: IPresetCommand, p?: any) { |
| 22 | const cmd = this.preset.get(action); |
| 23 | if (!cmd) throw new Error($t("TXT_CODE_preset.actionErr", { action: action })); |
| 24 | return await cmd.exec(this.self, p); |
| 25 | } |
| 26 | |
| 27 | clearPreset() { |
| 28 | this.preset.clear(); |