提交 9f17599e 编写于 作者: Smart-Space's avatar Smart-Space

更新res/logo.ico, res/logo.png, res/about.aardio, res/markdownshow.aardio,...

更新res/logo.ico, res/logo.png, res/about.aardio, res/markdownshow.aardio, res/loglist.aardio, res/rtfshow.aardio
上级 6a95fe50
import win.ui;
/*DSG{{*/
var winform = win.form(text="about";right=591;bottom=539)
winform.add(
plus={cls="plus";left=7;top=7;right=164;bottom=130;ah=1;aw=1;background="\res\logo.png";font=LOGFONT(h=-16;name='Segoe UI Emoji');repeat="scale";z=1};
static={cls="static";text="日志管理器";left=195;top=7;right=583;bottom=130;ah=1;aw=1;center=1;font=LOGFONT(h=-56;name='Segoe UI Emoji');transparent=1;z=2};
static2={cls="static";text="日志管理器 2022~现在";left=7;top=178;right=579;bottom=218;ah=1;aw=1;center=1;font=LOGFONT(h=-18;name='Segoe UI Emoji');notify=1;transparent=1;z=3};
static3={cls="static";text="日志管理器 由 Smart-Space 开发并维护";left=7;top=210;right=579;bottom=250;ah=1;aw=1;center=1;font=LOGFONT(h=-18;name='Segoe UI Emoji');notify=1;transparent=1;z=4};
static4={cls="static";text="通过本应用方便地管理你的日志环境,记录你的奇思妙想……";left=7;top=269;right=579;bottom=309;ah=1;aw=1;center=1;font=LOGFONT(h=-18;name='Segoe UI Emoji');notify=1;transparent=1;z=5}
)
/*}}*/
winform.show();
win.loopMessage();
return winform;
\ No newline at end of file
import win.ui;
/*DSG{{*/
var winform = win.form(text="收藏的日志目录";right=536;bottom=236)
winform.add(
button={cls="button";text='打开日志环境目录\uD83D\uDCC2';left=5;top=197;right=532;bottom=233;ah=1;aw=1;font=LOGFONT(h=-16;name='Segoe UI Emoji');z=1};
listbox={cls="listbox";left=5;top=8;right=532;bottom=192;ah=1;aw=1;font=LOGFONT(h=-16;name='Segoe UI Emoji');hscroll=1;items={};vscroll=1;z=2}
)
/*}}*/
mask,newlogdist,loglist=...
for(k,v in loglist){
winform.listbox.add(v)
}
winform.button.oncommand = function(id,event){
winform.close()
mask.show(false)
newlogdist(path)
}
winform.listbox.oncommand = function(id,event){
if (winform.listbox.selText){
path=winform.listbox.selText
}
}
winform.onClose = function(hwnd,message,wParam,lParam){
mask.show(false)
}
path=null
winform.show();
win.loopMessage();
return winform;
\ No newline at end of file
import win.ui;
import web.view
import console
/*DSG{{*/
var winform = win.form(text="markdown show";right=591;bottom=539)
winform.add(
button={cls="button";text="关于Markdown编辑器";left=0;top=0;right=200;bottom=28;ah=1;aw=1;font=LOGFONT(h=-16;name='Segoe UI Emoji');z=2};
button2={cls="button";text="关闭此编辑器";left=392;top=0;right=592;bottom=28;ah=1;aw=1;font=LOGFONT(h=-16;name='Segoe UI Emoji');z=3};
custom={cls="custom";text="自定义控件";left=0;top=30;right=592;bottom=540;ah=1;aw=1;z=1}
)
/*}}*/
console.open()
logname=...
webview=web.view(winform.custom)
markdownhtml=`
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vditor/dist/index.css" />
<script src="https://cdn.jsdelivr.net/npm/vditor/dist/index.min.js"></script>
</head>
<body>
<div style="height:30px"></div>
<div id="vditor" style="height: auto; width: auto; z-index: 90;" class="vditor vditor--fullscreen"></div>
</body>
</html>
<script>
var vditor = new Vditor("vditor",{
cache:{
enable: false,
},
value: "",
//height: window.innerHeight,
});
</script>
`
webview.html=markdownhtml
loadmd=function(path){//导入md文本
var md=string.load(path)
sleep(500)/*
var mds=io.lines(path)
var t={}
for i in mds{
table.insert(t,i)
}
sleep(500)
for k,i in t{
webview.doScript('vditor.insertValue("\\n\\n'+i+'")')
}*/
webview.doScript('vditor.setValue("'+string.replace(md,'\r\n','\\\\n')+'")')
sleep(1000)
getmd()
}
getmd=function(){//获取md文本
var content=webview.eval("vditor.getValue()")
//console.log(content)
}
functions={loadmd,getmd}
winform.webview=webview
winform.functions=functions
//functions[1]("E:\网站建设资源\www.smart-space.com.cn\project\index.md")
//functions[1](logname)
winform.button2.oncommand = function(id,event){
winform.close()
}
winform.show();
win.loopMessage();
return winform;
\ No newline at end of file
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=591;bottom=539)
winform.add(
button={cls="button";text="关于RTF编辑器";left=0;top=0;right=200;bottom=28;ah=1;aw=1;font=LOGFONT(h=-16;name='Segoe UI Emoji');z=2};
button2={cls="button";text="关闭此编辑器";left=392;top=0;right=592;bottom=28;ah=1;aw=1;font=LOGFONT(h=-16;name='Segoe UI Emoji');z=3};
custom={cls="custom";text="自定义控件";left=0;top=30;right=592;bottom=540;z=1}
)
/*}}*/
winform.show();
win.loopMessage();
return winform;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册