|
- 12471354912025年6月18日签到记录贴
我在 2025-06-18 11:56 完成签到,是今天第6个签到的用户,获得随机奖励 金钱 1,另外我还额外获得了 金钱 5 我今天最想说:「该会员没有填写今日想说内容.」. - niqiu82【三期aardio视频】04-06.计算器
[AAuto] 纯文本查看 复制代码 import win.ui;
/*DSG{{*/
mainForm = win.form(text="04.计算器";right=367;bottom=495;max=false;min=false)
mainForm.add(
edit={cls="edit";left=104;top=16;right=352;bottom=72;align="right";edge=1;font=LOGFONT(h=-21);multiline=1;readonly=1;z=1};
edit2={cls="edit";left=104;top=88;right=352;bottom=176;align="right";edge=1;font=LOGFONT(h=-21);multiline=1;readonly=1;z=2};
static={cls="static";text="计算式";left=16;top=16;right=88;bottom=64;align="center";center=1;font=LOGFONT(h=-19);transparent=1;z=23};
static2={cls="static";text="结 果";left=16;top=104;right=88;bottom=152;align="center";center=1;font=LOGFONT(h=-19);transparent=1;z=24};
一={cls="button";text="1";left=192;top=304;right=264;bottom=344;font=LOGFONT(h=-19);z=11};
七={cls="button";text="7";left=192;top=192;right=264;bottom=232;font=LOGFONT(h=-19);z=5};
三={cls="button";text="3";left=16;top=304;right=88;bottom=344;font=LOGFONT(h=-19);z=9};
乘={cls="button";text="*";left=280;top=304;right=352;bottom=344;font=LOGFONT(h=-19);z=17};
九={cls="button";text="9";left=16;top=192;right=88;bottom=232;font=LOGFONT(h=-19);z=3};
二={cls="button";text="2";left=104;top=304;right=176;bottom=344;font=LOGFONT(h=-19);z=10};
五={cls="button";text="5";left=104;top=248;right=176;bottom=288;font=LOGFONT(h=-19);z=7};
余={cls="button";text="%";left=104;top=416;right=176;bottom=456;font=LOGFONT(h=-19);z=21};
八={cls="button";text="8";left=104;top=192;right=176;bottom=232;font=LOGFONT(h=-19);z=4};
六={cls="button";text="6";left=16;top=248;right=88;bottom=288;font=LOGFONT(h=-19);z=6};
减={cls="button";text="-";left=280;top=248;right=352;bottom=288;font=LOGFONT(h=-19);z=16};
加={cls="button";text="+";left=280;top=192;right=352;bottom=232;font=LOGFONT(h=-19);z=15};
四={cls="button";text="4";left=192;top=248;right=264;bottom=288;font=LOGFONT(h=-19);z=8};
回退={cls="button";text="back";left=16;top=416;right=88;bottom=456;font=LOGFONT(h=-19);z=22};
幂={cls="button";text="**";left=192;top=360;right=264;bottom=400;font=LOGFONT(h=-19);z=14};
清空={cls="button";text="C";left=192;top=416;right=264;bottom=456;font=LOGFONT(h=-19);z=20};
点={cls="button";text=".";left=104;top=360;right=176;bottom=400;font=LOGFONT(h=-19);z=13};
等于={cls="button";text="=";left=280;top=416;right=352;bottom=456;font=LOGFONT(h=-19);z=19};
除={cls="button";text="/";left=280;top=360;right=352;bottom=400;font=LOGFONT(h=-19);z=18};
零={cls="button";text="0";left=16;top=360;right=88;bottom=400;font=LOGFONT(h=-19);z=12}
)
/*}}*/
mainForm.九.oncommand = function(id,event){
mainForm.edit.text ++= 9;
}
mainForm.八.oncommand = function(id,event){
mainForm.edit.text ++= 8;
}
mainForm.七.oncommand = function(id,event){
mainForm.edit.text ++= 7;
}
mainForm.六.oncommand = function(id,event){
mainForm.edit.text ++= 6;
}
mainForm.五.oncommand = function(id,event){
mainForm.edit.text ++= 5;
}
mainForm.四.oncommand = function(id,event){
mainForm.edit.text ++= 4;
}
mainForm.三.oncommand = function(id,event){
mainForm.edit.text ++= 3;
}
mainForm.二.oncommand = function(id,event){
mainForm.edit.text ++= 2;
}
mainForm.一.oncommand = function(id,event){
mainForm.edit.text ++= 1;
}
mainForm.零.oncommand = function(id,event){
mainForm.edit.text ++= 0;
}
mainForm.点.oncommand = function(id,event){
mainForm.edit.text ++= ".";
}
mainForm.幂.oncommand = function(id,event){
if(mainForm.edit.text != ""){
mainForm.edit.text ++= "**";
}
}
mainForm.回退.oncommand = function(id,event){
mainForm.edit.text = string.left(mainForm.edit.text,string.len(mainForm.edit.text)-1);
}
mainForm.加.oncommand = function(id,event){
mainForm.edit.text ++= "+";
}
mainForm.减.oncommand = function(id,event){
mainForm.edit.text ++= "-";
}
mainForm.乘.oncommand = function(id,event){
mainForm.edit.text ++= "*";
}
mainForm.除.oncommand = function(id,event){
mainForm.edit.text ++= "/";
}
mainForm.余.oncommand = function(id,event){
mainForm.edit.text ++= "%";
}
mainForm.清空.oncommand = function(id,event){
mainForm.edit.text = null;
mainForm.edit2.text = null;
}
mainForm.等于.oncommand = function(id,event){
mainForm.edit2.text = mainForm.edit.text ++ " = " ++ eval(mainForm.edit.text);
//mainForm.edit.text = null;
}
mainForm.show();
return win.loopMessage();
简单写了一下,怎么禁用窗体拖动大小?
另外一些错误情况不知道怎么处理,比如小数点不能同一个数字出现多次等。 - 一休不在愁32025年6月17日签到记录贴
我在 2025-06-17 16:51 完成签到,是今天第7个签到的用户,获得随机奖励 金钱 1,另外我还额外获得了 金钱 4 我今天最想说:「该会员没有填写今日想说内容.」. - 研墨破晓42025年6月16日签到记录贴
我在 2025-06-16 20:47 完成签到,是今天第5个签到的用户,获得随机奖励 金钱 2,另外我还额外获得了 金钱 6 我今天最想说:「该会员没有填写今日想说内容.」. - M7e52025年6月15日签到记录贴
我在 2025-06-15 22:05 完成签到,是今天第5个签到的用户,获得随机奖励 金钱 1,另外我还额外获得了 金钱 6 我今天最想说:「该会员没有填写今日想说内容.」. - 研墨破晓62025年6月14日签到记录贴
我在 2025-06-14 22:18 完成签到,是今天第2个签到的用户,获得随机奖励 金钱 2,另外我还额外获得了 金钱 9 我今天最想说:「该会员没有填写今日想说内容.」. - 研墨破晓72025年6月13日签到记录贴
我在 2025-06-13 23:08 完成签到,是今天第8个签到的用户,获得随机奖励 金钱 2,另外我还额外获得了 金钱 3 我今天最想说:「该会员没有填写今日想说内容.」. - XWCXF8aardio批处理脚本
- 哈哈哈92025年6月12日签到记录贴
我在 2025-06-12 23:11 完成签到,是今天第6个签到的用户,获得随机奖励 金钱 1,另外我还额外获得了 金钱 5 我今天最想说:「该会员没有填写今日想说内容.」. - 研墨破晓102025年6月11日签到记录贴
我在 2025-06-11 22:28 完成签到,是今天第6个签到的用户,获得随机奖励 金钱 2,另外我还额外获得了 金钱 5 我今天最想说:「该会员没有填写今日想说内容.」.
|
|