程序写完
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
import { Button, VerticalBox } from "std-widgets.slint";
|
||||
|
||||
export global Globals {
|
||||
//启动按钮状态
|
||||
in-out property <bool> StartEnable: false;
|
||||
//停止按钮状态
|
||||
in-out property <bool> StopEnable: false;
|
||||
}
|
||||
|
||||
export component MainWindow inherits Window {
|
||||
title: "VoileTftpTools";
|
||||
icon: @image-url("../tftp.png");
|
||||
height: 180px;
|
||||
width: 320px;
|
||||
title: "VoileTftpTools";
|
||||
default-font-family: "Segoe UI";
|
||||
default-font-size: 16px;
|
||||
default-font-weight: 700;
|
||||
in-out property <bool> StartEnable <=> Globals.StartEnable;
|
||||
in-out property <bool> StopEnable <=> Globals.StopEnable;
|
||||
//选择路径回调
|
||||
callback BrowserFolder() -> string;
|
||||
property <string> SelectFolder: "";
|
||||
@@ -39,6 +49,7 @@ export component MainWindow inherits Window {
|
||||
height: parent.height;
|
||||
width: parent.width;
|
||||
text: "启动";
|
||||
enabled: StartEnable;
|
||||
clicked => {
|
||||
StartTftp();
|
||||
}
|
||||
@@ -54,6 +65,7 @@ export component MainWindow inherits Window {
|
||||
height: parent.height;
|
||||
width: parent.width;
|
||||
text: "停止";
|
||||
enabled: StopEnable;
|
||||
clicked => {
|
||||
StopTftp();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user