add 优化界面效果
This commit is contained in:
parent
1fce34b1ca
commit
d0cef74370
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
*.exe
|
||||
dist/CircosHeatmap-aardio.exe
|
@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project ver="10" name="CircosHeatmap-aardio" libEmbed="true" icon="..." ui="win" output="CircosHeatmap-aardio.exe" CompanyName="单位名称" FileDescription="CircosHeatmap-aardio" LegalCopyright="Copyright (C) 作者 2025" ProductName="CircosHeatmap-aardio" InternalName="CircosHeatmap-aardio" FileVersion="0.0.0.7" ProductVersion="0.0.0.7" publishDir="/dist/" dstrip="true">
|
||||
<project ver="10" name="CircosHeatmap-aardio" libEmbed="true" icon="..." ui="win" output="CircosHeatmap-aardio.exe" CompanyName="单位名称" FileDescription="CircosHeatmap-aardio" LegalCopyright="Copyright (C) 作者 2025" ProductName="CircosHeatmap-aardio" InternalName="CircosHeatmap-aardio" FileVersion="0.0.0.9" ProductVersion="0.0.0.9" publishDir="/dist/" dstrip="true">
|
||||
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
|
||||
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
|
||||
<file name="heatmap_script.R" path="res\heatmap_script.R" comment="res\heatmap_script.R"/>
|
||||
<file name="r_script.aardio" path="res\r_script.aardio" comment="res\r_script.aardio"/>
|
||||
</folder>
|
||||
<folder name="窗体文件" path="dlg" comment="目录" embed="true"/>
|
||||
</project>
|
||||
|
BIN
dist/CircosHeatmap-aardio.exe
vendored
BIN
dist/CircosHeatmap-aardio.exe
vendored
Binary file not shown.
32
main.aardio
32
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);
|
||||
}
|
||||
|
||||
// 显示主窗口
|
||||
|
Loading…
x
Reference in New Issue
Block a user