add 更新pdf生成结果检查逻辑
This commit is contained in:
parent
82decbdec3
commit
08b58cc9e7
21
main.aardio
21
main.aardio
@ -6,7 +6,7 @@ mainForm.add(
|
||||
btnRun={cls="plus";text="生成pdf";left=891;top=661;right=991;bottom=691;align="left";border={color=-16777216;width=1};db=1;dr=1;font=LOGFONT(h=-16;name='微软雅黑');iconStyle={align="left";font=LOGFONT(h=-13;name='FontAwesome');padding={left=15}};iconText='\uF08B';textPadding={left=32};z=3};
|
||||
btnSelectFile={cls="plus";text="数据源";left=786;top=661;right=886;bottom=691;align="left";border={top=1;right=1;bottom=1;color=-16777216};db=1;dr=1;font=LOGFONT(h=-16;name='微软雅黑');iconStyle={align="left";font=LOGFONT(h=-13;name='FontAwesome');padding={left=18}};iconText='\uF15C';textPadding={left=35};z=2};
|
||||
editConsole={cls="richedit";left=10;top=510;right=990;bottom=650;bgcolor=4274224;color=15326936;db=1;dl=1;dr=1;hscroll=1;multiline=1;readonly=1;vscroll=1;z=5};
|
||||
editRScript={cls="edit";left=10;top=10;right=990;bottom=500;border=1;color=4473924;db=1;dl=1;dr=1;dt=1;hscroll=1;multiline=1;vscroll=1;z=4};
|
||||
editRScript={cls="edit";left=10;top=10;right=990;bottom=500;border=1;color=4473924;db=1;dl=1;dr=1;dt=1;font=LOGFONT(h=-16);hscroll=1;multiline=1;vscroll=1;z=4};
|
||||
inputFile={cls="plus";left=10;top=661;right=786;bottom=691;align="right";border={left=1;top=1;bottom=1;color=-16736064};db=1;dl=1;dr=1;editable="edit";font=LOGFONT(h=-13);textPadding={left=5;top=8;right=5;bottom=2};z=1}
|
||||
)
|
||||
/*}}*/
|
||||
@ -37,8 +37,8 @@ mainForm.btnRun.skin({
|
||||
});
|
||||
|
||||
import console;
|
||||
import process.r;
|
||||
import fsys.dlg;
|
||||
import process.r;
|
||||
|
||||
mainForm.editRScript.print($"\script\heatmap_script.R");
|
||||
|
||||
@ -80,14 +80,21 @@ mainForm.btnRun.oncommand = function(id, event) {
|
||||
mainForm.editConsole.appendLink('\r\n');
|
||||
mainForm.editConsole.appendText(out);
|
||||
|
||||
out_lines = string.split(out, '\r\n');
|
||||
if (out_lines[#out_lines] == outputFilePath) {
|
||||
mainForm.editConsole.appendLink('\r\n');
|
||||
mainForm.editConsole.appendText( textColor = 0x37D437, point = 10, "热图已成功保存至:" + outputFilePath);
|
||||
// 结果检查
|
||||
out_lines = string.split(out, '\r\n');
|
||||
if (!io.exist(outputFilePath) or out_lines[#out_lines] == "Execution halted") {
|
||||
mainForm.editConsole.appendLink('\r\n');
|
||||
mainForm.editConsole.appendText( textColor = 0xC7C7FF, point = 10, "出错了!检查日志是否有错误说明");
|
||||
}
|
||||
else {
|
||||
mainForm.editConsole.appendLink('\r\n');
|
||||
mainForm.editConsole.appendText( textColor = 0x37D437, point = 10, "热图已成功保存至(注意检查是否符合预期):");
|
||||
mainForm.editConsole.appendLink('\r\n');
|
||||
mainForm.editConsole.appendText( textColor = 0x37D437, point = 12, outputFilePath);
|
||||
}
|
||||
|
||||
// 滚动到最后一行
|
||||
mainForm.editConsole.vScroll();
|
||||
|
||||
}
|
||||
|
||||
//显示版本号
|
||||
|
Loading…
x
Reference in New Issue
Block a user