调整C#调用方式,减少编译次数,优化参数传递

This commit is contained in:
fofolee
2025-01-14 10:44:43 +08:00
parent 55be953eef
commit 601df1f1e3
13 changed files with 956 additions and 1060 deletions

View File

@@ -108,6 +108,115 @@ export const uiCommands = {
icon: "web",
defaultOpened: false,
commands: [
{
value: "quickcommand.showMessageBox",
label: "消息提示",
desc: "显示一个自动消失的提示框",
isAsync: true,
config: [
{
label: "提示内容",
component: "VariableInput",
icon: "info",
defaultValue: newVarInputVal("str", "这是一条提示消息"),
width: 12,
},
],
subCommands: [
{
value: "quickcommand.showMessageBox",
icon: "call_to_action",
label: "插件内弹窗",
config: [
{
label: "图标类型",
component: "q-select",
defaultValue: "success",
icon: "lightbulb",
width: 6,
options: [
{ label: "成功", value: "success" },
{ label: "错误", value: "error" },
{ label: "警告", value: "warning" },
{ label: "信息", value: "info" },
],
},
{
label: "显示时间(ms)",
component: "NumberInput",
min: 0,
step: 100,
width: 6,
placeholder: "0为手动关闭留空按文本长度调整",
},
],
},
{
value: "quickcommand.showSystemMessageBox",
icon: "report",
label: "系统弹窗",
config: [
{
label: "标题",
component: "VariableInput",
defaultValue: newVarInputVal("str", "提示"),
width: 12,
},
],
},
],
},
{
value: "quickcommand.showConfirmBox",
label: "确认框",
desc: "显示一个确认框,返回是否点击了确认",
isAsync: true,
outputVariable: "confirmed",
saveOutput: true,
config: [
{
label: "提示内容",
component: "VariableInput",
defaultValue: newVarInputVal("str", "确认要执行此操作吗?"),
width: 12,
},
{
label: "标题",
component: "VariableInput",
defaultValue: newVarInputVal("str", "提示"),
width: 12,
},
],
subCommands: [
{
value: "quickcommand.showConfirmBox",
icon: "call_to_action",
label: "插件内弹窗",
config: [
{
label: "支持HTML",
component: "CheckButton",
defaultValue: false,
width: 6,
},
{
label: "宽度",
component: "NumberInput",
min: 0,
step: 100,
defaultValue: 450,
width: 6,
placeholder: "对话框宽度",
},
],
},
{
value: "quickcommand.showSystemConfirmBox",
icon: "report",
label: "系统弹窗",
},
],
},
{
value: "quickcommand.showButtonBox",
label: "按钮组",
@@ -253,115 +362,6 @@ export const uiCommands = {
},
],
},
{
value: "quickcommand.showMessageBox",
label: "消息提示",
desc: "显示一个自动消失的提示框",
isAsync: true,
config: [
{
label: "提示内容",
component: "VariableInput",
icon: "info",
defaultValue: newVarInputVal("str", "这是一条提示消息"),
width: 12,
},
],
subCommands: [
{
value: "quickcommand.showMessageBox",
icon: "call_to_action",
label: "插件内弹窗",
config: [
{
label: "图标类型",
component: "q-select",
defaultValue: "success",
icon: "lightbulb",
width: 6,
options: [
{ label: "成功", value: "success" },
{ label: "错误", value: "error" },
{ label: "警告", value: "warning" },
{ label: "信息", value: "info" },
],
},
{
label: "显示时间(ms)",
component: "NumberInput",
min: 0,
step: 100,
width: 6,
placeholder: "0为手动关闭留空按文本长度调整",
},
],
},
{
value: "quickcommand.showSystemMessageBox",
icon: "report",
label: "系统弹窗",
config: [
{
label: "标题",
component: "VariableInput",
defaultValue: newVarInputVal("str", "提示"),
width: 12,
},
],
},
],
},
{
value: "quickcommand.showConfirmBox",
label: "确认框",
desc: "显示一个确认框,返回是否点击了确认",
isAsync: true,
outputVariable: "confirmed",
saveOutput: true,
config: [
{
label: "提示内容",
component: "VariableInput",
defaultValue: newVarInputVal("str", "确认要执行此操作吗?"),
width: 12,
},
{
label: "标题",
component: "VariableInput",
defaultValue: newVarInputVal("str", "提示"),
width: 12,
},
],
subCommands: [
{
value: "quickcommand.showConfirmBox",
icon: "call_to_action",
label: "插件内弹窗",
config: [
{
label: "支持HTML",
component: "CheckButton",
defaultValue: false,
width: 6,
},
{
label: "宽度",
component: "NumberInput",
min: 0,
step: 100,
defaultValue: 450,
width: 6,
placeholder: "对话框宽度",
},
],
},
{
value: "quickcommand.showSystemConfirmBox",
icon: "report",
label: "系统弹窗",
},
],
},
{
value: "utools.showOpenDialog",
label: "文件选择框",

View File

@@ -51,7 +51,7 @@ export const windowsCommands = {
defaultOpened: false,
commands: [
{
value: "quickcomposer.windows.window.setTopMost",
value: "quickcomposer.windows.window.getWindowInfo",
label: "窗口控制",
desc: "Windows窗口操作",
icon: "window",
@@ -79,6 +79,13 @@ export const windowsCommands = {
},
],
subCommands: [
{
value: "quickcomposer.windows.window.getWindowInfo",
label: "窗口信息",
icon: "info",
outputVariable: "windowInfo",
saveOutput: true,
},
{
value: "quickcomposer.windows.window.setTopMost",
label: "窗口置顶",
@@ -238,19 +245,12 @@ export const windowsCommands = {
},
],
},
{
value: "quickcomposer.windows.window.getWindowInfo",
label: "窗口信息",
icon: "info",
outputVariable: "windowInfo",
saveOutput: true,
},
],
isAsync: true,
},
{
value: "quickcomposer.windows.automation.inspectWindow",
label: "界面自动化",
value: "quickcomposer.windows.sendmessage.inspectWindow",
label: "界面自动化(sendmessage)",
desc: "Windows界面自动化操作",
icon: "smart_button",
isAsync: true,
@@ -279,7 +279,7 @@ export const windowsCommands = {
],
subCommands: [
{
value: "quickcomposer.windows.automation.inspectWindow",
value: "quickcomposer.windows.sendmessage.inspectWindow",
label: "获取控件树",
icon: "account_tree",
outputVariable: "controlsTree",
@@ -314,7 +314,7 @@ export const windowsCommands = {
],
},
{
value: "quickcomposer.windows.automation.click",
value: "quickcomposer.windows.sendmessage.click",
label: "点击控件",
icon: "mouse",
config: [
@@ -372,7 +372,7 @@ export const windowsCommands = {
],
},
{
value: "quickcomposer.windows.automation.sendText",
value: "quickcomposer.windows.sendmessage.sendText",
label: "发送文本",
icon: "keyboard",
config: [
@@ -413,7 +413,7 @@ export const windowsCommands = {
],
},
{
value: "quickcomposer.windows.automation.sendKeys",
value: "quickcomposer.windows.sendmessage.sendKeys",
label: "发送按键",
icon: "keyboard_alt",
config: [