generated from OBJNULL/Dockerized-Rust
Compare commits
No commits in common. "748951596251ce46c2f212a45d27e44c632d8cbf" and "c3fd6dea17e0e5b494ab05959ad32993a17bc9c1" have entirely different histories.
7489515962
...
c3fd6dea17
1 changed files with 4 additions and 12 deletions
|
@ -1,12 +1,6 @@
|
|||
import { DatePickerPopup, Button, VerticalBox, HorizontalBox, ComboBox } from "std-widgets.slint";
|
||||
import { Calculation } from "calculation.slint";
|
||||
|
||||
export struct CalcResult {
|
||||
message: string,
|
||||
start: int,
|
||||
end: int,
|
||||
}
|
||||
|
||||
export component Prorater inherits Window {
|
||||
title: "Auto Spa Express - Prorater";
|
||||
width: 1024px;
|
||||
|
@ -16,8 +10,8 @@ export component Prorater inherits Window {
|
|||
out property <string> last_billing: "NULL";
|
||||
out property <string> current_membership;
|
||||
out property <string> new_membership;
|
||||
property <CalcResult> calculation_result;
|
||||
callback on_calculate() -> CalcResult;
|
||||
property <string> calculate_msg: "NULL";
|
||||
callback on_calculate() -> string;
|
||||
|
||||
VerticalBox {
|
||||
Image {
|
||||
|
@ -81,7 +75,7 @@ export component Prorater inherits Window {
|
|||
Button {
|
||||
text: "Calculate";
|
||||
clicked => {
|
||||
calculation_result = on_calculate();
|
||||
calculate_msg = on_calculate();
|
||||
calculation.show();
|
||||
}
|
||||
}
|
||||
|
@ -111,9 +105,7 @@ export component Prorater inherits Window {
|
|||
}
|
||||
|
||||
calculation := Calculation {
|
||||
message: calculation_result.message;
|
||||
start: calculation_result.start;
|
||||
end: calculation_result.end;
|
||||
message: calculate_msg;
|
||||
x: (root.width - self.width) / 2;
|
||||
y: (root.height - self.height) / 2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue