File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -37,3 +37,5 @@ broker = mqtt.server.exaple.com
37
37
topic = /exaple/topic
38
38
displayOn = open
39
39
displayOff = close
40
+ [DATE-FORMAT]
41
+ format = %Y-%m-%d
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ using Curses;
18
18
public class ClockWindow {
19
19
AsciiNumbers ascii;
20
20
Window win;
21
+ string dateformat;
22
+ Config cfg;
21
23
22
24
public ClockWindow () {
23
25
ascii = new AsciiNumbers ();
@@ -26,6 +28,9 @@ public class ClockWindow {
26
28
27
29
win. clrtobot();
28
30
win. box(0 , 0 );
31
+
32
+ cfg = Bus . get_proxy_sync(BusType . SYSTEM , " io.mainframe.shopsystem.Config" , " /io/mainframe/shopsystem/config" );
33
+ dateformat = cfg. get_string(" DATE-FORMAT" , " format" );
29
34
30
35
win. refresh();
31
36
}
@@ -63,7 +68,7 @@ public class ClockWindow {
63
68
win. clrtobot();
64
69
win. box(0 , 0 );
65
70
66
- win. mvaddstr(5 ,4 , now. format(" %Y-%m-%d " ));
71
+ win. mvaddstr(5 ,4 , now. format(dateformat ));
67
72
68
73
win. refresh();
69
74
}
You can’t perform that action at this time.
0 commit comments