瀏覽代碼

configure settings

alpha
Jeong Geol Kim 4 年之前
父節點
當前提交
bed612cc47
共有 2 個檔案被更改,包括 28 行新增0 行删除
  1. 21
    0
      main.py
  2. 7
    0
      settings.json

+ 21
- 0
main.py 查看文件

@@ -0,0 +1,21 @@
1
+import tkinter
2
+import json
3
+
4
+
5
+window = tkinter.Tk()
6
+settings =[]
7
+
8
+
9
+with open('./settings.json', encoding='utf-8')as json_file:
10
+    json_data = json.load(json_file)
11
+    settings.append(json_data['window_name'])
12
+    settings.append(json_data['window_position'])
13
+    settings.append(json_data['branch_location'])
14
+    settings.append(json_data['surgery_room_number'])
15
+
16
+
17
+
18
+window.title(settings[0])
19
+window.geometry(settings[1])
20
+
21
+window.mainloop()

+ 7
- 0
settings.json 查看文件

@@ -0,0 +1,7 @@
1
+{
2
+    "window_name":"365mc M.A.I.L system Recorder",
3
+    "window_position": "640x480+300+300",
4
+    "branch_location": "seoul",
5
+    "surgery_room_number": 801
6
+
7
+}

Loading…
取消
儲存