From b034e820ba9842b5a67f7e2dbcca3b5a1f13f103 Mon Sep 17 00:00:00 2001 From: sunbeam Date: Thu, 29 Feb 2024 14:21:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8C=AF=E5=8A=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dlg/show.aardio | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dlg/show.aardio b/dlg/show.aardio index 4abd0cb..8edfc57 100644 --- a/dlg/show.aardio +++ b/dlg/show.aardio @@ -6,6 +6,8 @@ show = win.form(text="P417上位机";right=984;bottom=602;bgcolor=16777215;borde show.add( bkplus={cls="bkplus";left=49;top=93;right=880;bottom=372;ah=1;aw=1;background="\res\P417.png";z=1}; button={cls="button";text="Button";left=381;top=425;right=507;bottom=451;hide=1;z=31}; +button2={cls="button";text="左";left=253;top=512;right=352;bottom=571;z=43}; +button3={cls="button";text="右";left=437;top=512;right=536;bottom=571;z=44}; checkbox={cls="checkbox";text="点亮";left=112;top=31;right=198;bottom=68;ah=1;aw=1;bgcolor=16777215;checked=1;font=LOGFONT(h=-22);z=3}; checkbox2={cls="checkbox";text="白天";left=208;top=32;right=294;bottom=69;ah=1;aw=1;bgcolor=16777215;font=LOGFONT(h=-22);z=20}; checkbox3={cls="checkbox";text="发送";left=20;top=30;right=106;bottom=67;ah=1;aw=1;bgcolor=16777215;checked=1;font=LOGFONT(h=-22);z=42}; @@ -289,6 +291,35 @@ show.checkbox3.oncommand = function(id,event){ } +show.button2.oncommand = function(id,event){ + CT_SetDiagID(0x720,0x620); + CT_Diag10(0x03); + win.delay(20,1); + CT_Diag2EVal1B(0x9001,0x01); +} + +show.button3.oncommand = function(id,event){ + CT_SetDiagID(0x710,0x610); + CT_Diag10(0x03); + win.delay(20,1); + CT_Diag2EVal1B(0x9001,0x01); +} + +import win.ui.accelerator; +var accelerator = win.ui.accelerator({ + + { + alt = true; vkey = 'Q'#; + oncommand = function() show.button2.oncommand();//show.msgbox("ALT+1"); + }; + + { + alt = true; vkey = 'W'#; + oncommand = function() show.button3.oncommand();//show.msgbox("ALT+2"); + }; + +},show ); + show.show(); FreshPos(); return win.loopMessage(); \ No newline at end of file