diff --git a/.gitignore b/.gitignore index adb36c8..e0761d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -*.exe \ No newline at end of file +dist/CircosHeatmap-aardio.exe \ No newline at end of file diff --git a/default.aproj b/default.aproj index a95e014..6092c3d 100644 --- a/default.aproj +++ b/default.aproj @@ -1,8 +1,9 @@  - + + diff --git a/dist/CircosHeatmap-aardio.exe b/dist/CircosHeatmap-aardio.exe deleted file mode 100644 index f271b47..0000000 Binary files a/dist/CircosHeatmap-aardio.exe and /dev/null differ diff --git a/main.aardio b/main.aardio index 4ac0a3e..23fb69b 100644 --- a/main.aardio +++ b/main.aardio @@ -2,17 +2,36 @@ import win.ui; /*DSG{{*/ mainForm = win.form(text="CircosHeatmap-aardio";right=800;bottom=600) mainForm.add( -btnRun={cls="button";text="运行";left=740;top=10;right=780;bottom=40;z=4}; -btnSelectFile={cls="button";text="选择输入文件";left=607;top=11;right=727;bottom=41;z=3}; -editConsole={cls="edit";left=10;top=120;right=780;bottom=580;db=1;dl=1;dr=1;dt=1;edge=1;multiline=1;z=1}; -inputFile={cls="edit";left=10;top=10;right=600;bottom=40;edge=1;z=2} +btnRun={cls="plus";text="运行";left=740;top=10;right=791;bottom=41;activebgcolor=19354;bgcolor=-5197169;font=LOGFONT(h=-16);hoverbgcolor=23477;textcolor=16777215;z=4}; +btnSelectFile={cls="plus";text="选择输入文件";left=608;top=10;right=732;bottom=41;activebgcolor=19354;bgcolor=-5197169;font=LOGFONT(h=-16);hoverbgcolor=23477;textcolor=16777215;z=3}; +editConsole={cls="edit";left=10;top=467;right=791;bottom=591;bgcolor=16777215;db=1;dl=1;dr=1;edge=1;hscroll=1;multiline=1;textcolor=0;vscroll=1;z=1}; +editRScript={cls="edit";left=10;top=48;right=791;bottom=451;bgcolor=16777215;db=1;dl=1;dr=1;dt=1;edge=1;hscroll=1;multiline=1;textcolor=0;vscroll=1;z=5}; +inputFile={cls="edit";left=10;top=10;right=600;bottom=40;bgcolor=16777215;edge=1;textcolor=0;z=2} ) /*}}*/ +mainForm.btnRun.skin({ + background={ + active=0xFFD3E0BC; + default=0xFF8FB2B0; + hover=0xFF928BB3 + } +}) + +mainForm.btnSelectFile.skin({ + background={ + active=0xFFD3E0BC; + default=0xFF8FB2B0; + hover=0xFF928BB3 + } +}) + import console; import process.r; import fsys.dlg; +mainForm.editRScript.print($"\res\heatmap_script.R"); + // 选择文件按钮点击事件 mainForm.btnSelectFile.oncommand = function(id, event) { var filePath = fsys.dlg.open("CSV 文件|*.csv||",, "选择输入文件"); @@ -37,11 +56,8 @@ mainForm.btnRun.oncommand = function(id, event) { } // 执行 R 脚本 - var out = process.r.exec($"\res\heatmap_script.R", inputFilePath, outputFilePath); - - // 将 R 脚本的输出显示在控制台中 + var out = process.r.exec(mainForm.editRScript.text, inputFilePath, outputFilePath); mainForm.editConsole.print(out); - mainForm.editConsole.print("Circos热图已成功保存至: " + outputFilePath); } // 显示主窗口