ソースを参照

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
+}

読み込み中…
キャンセル
保存