2 Star 1 Fork 1

EZ118/Bili32

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.aardio 4.11 KB
一键复制 编辑 原始数据 按行查看 历史
import fonts.fontAwesome;
import fsys;
import win.ui;
import string;
import inet.http;
import web.json;
/*DSG{{*/
mainForm = win.form(text="Bilibili32";right=1047;bottom=647;bgcolor=2105376;border="none")
mainForm.add(
TopSearchBx={cls="edit";left=329;top=6;right=697;bottom=35;bgcolor=2960685;border=1;color=15793151;dl=0.31;dr=0.33;dt=1;font=LOGFONT(h=-16);z=9};
caption={cls="bkplus";text="Bili32";left=39;top=11;right=104;bottom=29;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);z=4};
custom={cls="custom";left=112;top=40;right=1048;bottom=648;bgcolor=1841176;db=1;dl=1;dr=1;dt=1;z=1};
logo={cls="bkplus";left=8;top=8;right=32;bottom=32;background="\res\icon_small.png";color=16777215;dl=1;dt=1;font=LOGFONT(h=-18;name='FontAwesome');repeat="scale";z=3};
navAccount={cls="plus";text="账户";left=8;top=160;right=104;bottom=200;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF007';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=5};
navDynamic={cls="plus";text="动态";left=8;top=80;right=104;bottom=120;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF1AA';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=7};
navFirst={cls="plus";text="推荐";left=8;top=40;right=104;bottom=80;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF00A';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=2};
navHelp={cls="plus";text="关于";left=8;top=200;right=104;bottom=240;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF06A';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=6};
navSearch={cls="plus";text="搜索";left=8;top=120;right=104;bottom=160;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF00E';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=8}
)
/*}}*/
import win.ui.simpleWindow;
win.ui.simpleWindow( mainForm );
/* 圆角 */
import win.util.round;
win.region.round(mainForm.custom);
import win.ui.tabs;
var tbs = win.ui.tabs(
mainForm.navFirst,
mainForm.navDynamic,
mainForm.navSearch,
mainForm.navAccount,
mainForm.navHelp
);
tbs.skin({
foreground={
active=0xFFFFFFFF;
default=0x00FFFFFF;
hover=0xFF2D2D2D
};
color={
default=0xFFFFFFFF;
};
checked={
foreground={default=0xFF454545;};
color={default=0xFF76B9ED;};
}
})
tbs.loadForm(1,"\dlg\first.aardio" );
tbs.loadForm(2,"\dlg\dynamic.aardio" );
tbs.loadForm(3,"\dlg\search.aardio" );
tbs.loadForm(4,"\dlg\account.aardio" );
tbs.loadForm(5,"\dlg\help.aardio" );
tbs.selIndex = 1;
/* 处理顶部搜索框按下Enter的处理事件 */
mainForm.TopSearchBx.translateAccelerator = function( msg ){
if( msg.wParam == 0xD/*_VK_ENTER*/ ){
if( msg.message == 0x101/*_WM_KEYUP*/ ){
tbs.selIndex = 3;
/* 调用search.aardio中的GoSearch(keyword)函数 */
GoSearch(mainForm.TopSearchBx.text);
}
return true;
}
}
/* 处理URL协议调用 */
if( #_ARGV ){
var urlpath = _ARGV[1]; //"bilibili://video/828304392?page=0&h5awaken=114514";
urlpath = string.split(urlpath, "/");
//win.msgbox(urlpath)
if (urlpath[3] == "video") {
a = urlpath[4] + "?";
a = string.split(a, "?")[1];
http = inet.http();
VideoInfo = web.json.parse(http.get("https://api.bilibili.com/x/web-interface/view?aid=" + a));
VideoBvid = VideoInfo.data.bvid;
playerf = win.loadForm("\dlg\player.aardio");
publish("bvid", VideoBvid);
}
}
/* ===== END ===== */
mainForm.show();
return win.loopMessage();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/EZ118/bili32.git
git@gitee.com:EZ118/bili32.git
EZ118
bili32
Bili32
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385