import win.ui;
import godking.message
/*DSG{{*/
var winform = win.form(text="aardio form";right=535;bottom=391)
winform.add(
button={cls="button";text="Button";left=232;top=168;right=303;bottom=202;z=1}
)
/*}}*/
//弹出账号密码对话框
var form = /***
//import win.ui;
/*DSG{{*/
var winform = win.form(text="设备用户名或密码错误,请重新输入";right=320;bottom=139;border="thin";exmode="none";max=false;min=false;mode="popup")
winform.add(
editAC={cls="edit";text="admin";left=184;top=19;right=295;bottom=51;dl=1;dr=1;dt=1;edge=1;limit=6;tabstop=1;z=1};
editPD={cls="edit";left=184;top=61;right=295;bottom=93;db=1;dl=1;dr=1;dt=1;edge=1;password=1;limit=6;tabstop=1;z=2};
plus={cls="plus";left=27;top=22;right=102;bottom=86;align="left";dl=1;dt=1;iconColor=5734655;iconStyle={align="left";font=LOGFONT(h=-56;name='FontAwesome')};iconText='\uF23E';textPadding={left=30};transparent=1;z=5};
plus2={cls="plus";text="缺省账号密码为admin";left=114;top=97;right=290;bottom=126;align="left";dl=1;dt=1;iconColor=32768;iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome')};iconText='\uF05A';textPadding={left=30};transparent=1;z=6};
static={cls="static";text="登录账号:";left=112;top=26;right=182;bottom=45;transparent=1;z=3};
static2={cls="static";text="登录密码:";left=113;top=66;right=183;bottom=86;transparent=1;z=4}
)
/*}}*/
win.showForeground(winform.hwnd)
winform.show();
winform.editAC.setFocus();
win.loopMessage();
***/
winform.button.oncommand = function(id,event){
var m = godking.message()
m.escClose = false;
m.icon='\uF084'
m.showTitlebar =false;
m.round = 12;
m.borderWidth=2;
m.borderColor = 0xFFFF0000;
var r = m.form("设备用户名或密码错误,请重新输入",form,true,0,function(winform){
/*在信息框中加载子窗口,参数:1、信息文本;2、form子窗体代码;3、是否显示确认取消按钮;4、超时关闭时间;5、确定按钮事件函数;
该函数的参数为加载的子窗体对象,该函数的返回值作为 modalMode=true 时 form() 函数的返回值*/
return {winform.editAC.text,winform.editPD.text};
})
if !r {
m.info("您取消了!",1000);
} else {
m.info("账号:"++r[1]++" 密码:"++r[2]);
}
}
winform.show();
win.loopMessage();