param.py 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. from tkinter import *
  2. import app
  3. import time
  4. import batch
  5. import production
  6. import inquire
  7. import sql
  8. import tkinter.messagebox
  9. class my_param(Frame):
  10. def __init__(self, init_window_name):
  11. self.init_window_name = init_window_name
  12. self.user_var = app.user_var
  13. self.screen_width = self.user_var.screen_width
  14. self.screen_height = self.user_var.screen_height
  15. self.font_size_title = app.font_size_title
  16. self.font_size_text = app.font_size_text
  17. self.sqlclient = sql.sqlclient
  18. self.param_tbl_check()
  19. self.main_gui_init()
  20. self.title_canvas_init()
  21. self.user_frame_init()
  22. self.input_lock = False
  23. self.view_timeout = 180
  24. self.user_var.windows_idx = 'param'
  25. self.fun_timer()
  26. def main_button_event(self):
  27. if self.input_lock == False:
  28. self.user_var.last_windows_idx = 'param'
  29. self.init_window_name.after_cancel(self.task_user)
  30. self.main_frame.destroy()
  31. app.my_gui(self.init_window_name)
  32. def data_button_event(self):
  33. if self.input_lock == False:
  34. self.user_var.last_windows_idx = 'param'
  35. print("Enter Data View!")
  36. self.init_window_name.after_cancel(self.task_user)
  37. self.main_frame.destroy()
  38. inquire.my_inquire(self.init_window_name)
  39. def product_button_event(self):
  40. if self.input_lock == False:
  41. if self.user_var.auth_stat == True:
  42. print("Please Select Production!")
  43. self.user_var.last_windows_idx = 'param'
  44. self.init_window_name.after_cancel(self.task_user)
  45. self.main_frame.destroy()
  46. production.my_production(self.init_window_name)
  47. else:
  48. tkinter.messagebox.showwarning(title='提示', message='请登录后操作!')
  49. def batchy_button_event(self):
  50. if self.input_lock == False:
  51. if self.user_var.auth_stat == True:
  52. self.user_var.last_windows_idx = 'param'
  53. self.init_window_name.after_cancel(self.task_user)
  54. self.main_frame.destroy()
  55. self.user_var.batch_sel = 'y'
  56. batch.my_batch(self.init_window_name)
  57. else:
  58. tkinter.messagebox.showwarning(title='提示', message='请登录后操作!')
  59. def param_update(self, key, value):
  60. name = key.split('_')
  61. if len(name)>=2:
  62. sqlstr = "UPDATE product_param_tbl SET "
  63. sqlstr = sqlstr + " {0}='{1}'".format(name[0], value)
  64. sqlstr = sqlstr + "WHERE product_name='{0}' and param_type={1}".format(self.user_var.product_name, name[1])
  65. self.sqlclient.sql_action_all(sqlstr)
  66. def auth_exit(self):
  67. if self.user_var.auth_timeout > 0:
  68. self.user_var.auth_timeout = self.user_var.auth_timeout - 1
  69. else:
  70. self.user_var.auth_stat = False
  71. def view_exit(self):
  72. if self.view_timeout > 0:
  73. self.view_timeout = self.view_timeout - 1
  74. else:
  75. self.user_var.last_windows_idx = 'param'
  76. self.init_window_name.after_cancel(self.task_user)
  77. self.main_frame.destroy()
  78. app.my_gui(self.init_window_name)
  79. def windows_update(self):
  80. currentTime = time.strftime('%Y/%m/%d %H:%M:%S', time.localtime(time.time()))
  81. self.timelabel.config(text=currentTime)
  82. self.auth_exit()
  83. self.init_window_name.update()
  84. self.fun_timer()
  85. self.view_exit()
  86. def fun_timer(self):
  87. self.task_user=self.init_window_name.after(1000, self.windows_update)
  88. def main_gui_init(self):
  89. self.main_frame = Frame(self.init_window_name, width=self.screen_width, height=self.screen_height)
  90. self.main_frame.pack()
  91. # 标题栏
  92. def title_canvas_init(self):
  93. self.title_canvas = Canvas(self.main_frame, width=self.screen_width - 20, height=35, bg='SeaGreen')
  94. self.mainlabel = Label(self.title_canvas, text="参数设定", fg='yellow', font=("宋体", self.font_size_title),
  95. bg='SeaGreen', anchor='w')
  96. self.mainlabel.place(x=20, y=5)
  97. self.timelabel = Label(self.title_canvas, text=time.strftime('%Y/%m/%d %H:%M:%S', time.localtime(time.time())),
  98. fg='yellow', font=("宋体", self.font_size_title), bg='SeaGreen', anchor='e')
  99. self.timelabel.place(x=self.title_canvas.winfo_reqwidth() - self.timelabel.winfo_reqwidth() - 20, y=5)
  100. self.title_canvas.create_line(self.mainlabel.winfo_reqwidth() / 2 + 20, 32, self.title_canvas.winfo_reqwidth() -
  101. self.timelabel.winfo_reqwidth() / 2 - 20, 32, fill='white')
  102. self.title_canvas.place(x=10, y=10)
  103. # def input_enter(self):
  104. # if len(self.input_entry.get()) > 0:
  105. # value = self.input_entry.get()
  106. # self.input_strvar.set(value)
  107. # self.param_update(self.input_var, value)
  108. # self.input_lock = False
  109. # self.input_frame.destroy()
  110. #
  111. # def input_exit(self):
  112. # self.input_lock = False
  113. # self.input_frame.destroy()
  114. #
  115. # def input_on_closing(self):
  116. # self.input_lock = False
  117. #
  118. # def input_param(self, var:str, strvar:StringVar):
  119. # if self.input_lock == False:
  120. # self.input_var = var
  121. # self.input_strvar = strvar
  122. # self.input_frame = tkinter.Tk(className='请输入值') # 弹出框框名
  123. # self.input_frame.geometry('300x150+350+225') # 设置弹出框的大小 w x h
  124. #
  125. # self.input_value = tkinter.StringVar() # 这即是输入框中的内容
  126. # self.input_entry = tkinter.Entry(self.input_frame, width=30) # 设置"文本变量"为var
  127. # self.input_entry.place(x=150 - self.input_entry.winfo_reqwidth() / 2, y=50)
  128. # self.input_enterbtn = tkinter.Button(self.input_frame, text='确定', width=5,
  129. # command=self.input_enter) # 按下此按钮(Input), 触发inputint函数
  130. # self.input_cancelbtn = tkinter.Button(self.input_frame, text='取消', width=5,
  131. # command=self.input_exit) # 按下此按钮(Clear), 触发inputclear函数
  132. # self.input_enterbtn.place(x=150-self.input_enterbtn.winfo_reqwidth() - 10,
  133. # y=100)
  134. # self.input_cancelbtn.place(x=160, y=100)
  135. # self.input_entry.focus()
  136. # self.input_entry.icursor(0)
  137. # self.input_frame.resizable(width=False, height=False)
  138. # self.input_frame.wm_attributes('-topmost', 1)
  139. # self.input_frame.attributes("-toolwindow", 2)
  140. # self.input_frame.focus_force()
  141. # self.input_frame.protocol("WM_DELETE_WINDOW",
  142. # self.input_on_closing)
  143. # self.input_lock = True
  144. # self.input_frame.mainloop()
  145. def param_tbl_check(self):
  146. sqlstr = "SELECT startuptime,airtime,presstime, testtime, exhaust, maxpress, minpress, setpress, capacity, \
  147. posthreshold, pnegthreshold FROM product_param_tbl WHERE product_name='{0}' and \
  148. param_type=17700".format(self.user_var.product_name)
  149. paramresult = self.sqlclient.sql_inquire_all(sqlstr)
  150. if paramresult != None and len(paramresult) > 0:
  151. for paramrow in paramresult:
  152. self.user_var.startdelay_17700_str.set(paramrow[0])
  153. self.user_var.airtime_17700_str.set(paramrow[1])
  154. self.user_var.presstime_17700_str.set(paramrow[2])
  155. self.user_var.testtime_17700_str.set(paramrow[3])
  156. self.user_var.exhaust_17700_str.set(paramrow[4])
  157. self.user_var.maxpress_17700_str.set(paramrow[5])
  158. self.user_var.minpress_17700_str.set(paramrow[6])
  159. self.user_var.setpress_17700_str.set(paramrow[7])
  160. self.user_var.capacity_17700_str.set(paramrow[8])
  161. self.user_var.posthreshold_17700_str.set(paramrow[9])
  162. self.user_var.pnegthreshold_17700_str.set(paramrow[10])
  163. else:
  164. self.user_var.startdelay_17700_str.set("0")
  165. self.user_var.airtime_17700_str.set("0")
  166. self.user_var.presstime_17700_str.set("0")
  167. self.user_var.testtime_17700_str.set("0")
  168. self.user_var.exhaust_17700_str.set("0")
  169. self.user_var.maxpress_17700_str.set("0")
  170. self.user_var.minpress_17700_str.set("0")
  171. self.user_var.setpress_17700_str.set("0")
  172. self.user_var.capacity_17700_str.set("0")
  173. self.user_var.posthreshold_17700_str.set("0")
  174. self.user_var.pnegthreshold_17700_str.set("0")
  175. sqlstr = "SELECT startuptime,airtime,presstime, testtime, exhaust, maxpress, minpress, setpress, capacity, \
  176. posthreshold, pnegthreshold FROM product_param_tbl WHERE product_name='{0}' and \
  177. param_type=17720".format(self.user_var.product_name)
  178. paramresult = self.sqlclient.sql_inquire_all(sqlstr)
  179. if paramresult != None and len(paramresult) > 0:
  180. for paramrow in paramresult:
  181. self.user_var.startdelay_17720_str.set(paramrow[0])
  182. self.user_var.airtime_17720_str.set(paramrow[1])
  183. self.user_var.presstime_17720_str.set(paramrow[2])
  184. self.user_var.testtime_17720_str.set(paramrow[3])
  185. self.user_var.exhaust_17720_str.set(paramrow[4])
  186. self.user_var.maxpress_17720_str.set(paramrow[5])
  187. self.user_var.minpress_17720_str.set(paramrow[6])
  188. self.user_var.setpress_17720_str.set(paramrow[7])
  189. self.user_var.capacity_17720_str.set(paramrow[8])
  190. self.user_var.posthreshold_17720_str.set(paramrow[9])
  191. self.user_var.pnegthreshold_17720_str.set(paramrow[10])
  192. else:
  193. self.user_var.startdelay_17720_str.set("0")
  194. self.user_var.airtime_17720_str.set("0")
  195. self.user_var.presstime_17720_str.set("0")
  196. self.user_var.testtime_17720_str.set("0")
  197. self.user_var.exhaust_17720_str.set("0")
  198. self.user_var.maxpress_17720_str.set("0")
  199. self.user_var.minpress_17720_str.set("0")
  200. self.user_var.setpress_17720_str.set("0")
  201. self.user_var.capacity_17720_str.set("0")
  202. self.user_var.posthreshold_17720_str.set("0")
  203. self.user_var.pnegthreshold_17720_str.set("0")
  204. def param_double_event(self, event, var, strvar:StringVar):
  205. print("Enter Param Value!")
  206. # if self.user_var.auth_stat == True:
  207. # self.input_param(var, strvar)
  208. # else:
  209. # tkinter.messagebox.showwarning(title='提示', message='请登录后操作!')
  210. # 输入栏
  211. def user_frame_init(self):
  212. self.order_frame = Frame(
  213. self.main_frame, width=self.screen_width - 20, relief=SUNKEN, borderwidth=2, bg = "Skyblue",
  214. height=self.screen_height - self.title_canvas.winfo_reqheight() - 35)
  215. # 工单栏展示
  216. self.order_frame.place(x=12, y=self.title_canvas.winfo_reqheight() + 15)
  217. self.mainbutton_canvas = Canvas(self.order_frame, bg='DarkGray', relief=SOLID, borderwidth=1,
  218. width=138, height=40)
  219. self.main_button = Button(self.mainbutton_canvas, text="返回主界面", fg='black', bg='white', width=11,
  220. activebackground='black', activeforeground='white',
  221. font=("宋体", self.font_size_title, "bold"), command=self.main_button_event)
  222. self.main_button.place(x=7, y=7)
  223. self.mainbutton_canvas.place(x=50, y=50)
  224. self.databutton_canvas = Canvas(self.order_frame, bg='DarkGray', relief=SOLID, borderwidth=1,
  225. width=138, height=40)
  226. self.data_button = Button(self.databutton_canvas, text="返回数据查询", fg='black', bg='white', width=11,
  227. activebackground='black', activeforeground='white',
  228. font=("宋体", self.font_size_title, "bold"), command=self.data_button_event)
  229. self.data_button.place(x=7, y=7)
  230. self.databutton_canvas.place(x=50, y=100)
  231. self.productbutton_canvas = Canvas(self.order_frame, bg='DarkGray', relief=SOLID, borderwidth=1,
  232. width=138, height=40)
  233. self.product_button = Button(self.productbutton_canvas, text="品番设定", fg='black', bg='white', width=11,
  234. activebackground='black', activeforeground='white',
  235. font=("宋体", self.font_size_title, "bold"), command=self.product_button_event)
  236. self.product_button.place(x=7, y=7)
  237. self.productbutton_canvas.place(x=50, y=150)
  238. self.batchybutton_canvas = Canvas(self.order_frame, bg='DarkGray', relief=SOLID, borderwidth=1,
  239. width=138, height=40)
  240. self.batchy_button = Button(self.batchybutton_canvas, text="年份批号选择", fg='black', bg='white', width=11,
  241. activebackground='black', activeforeground='white',
  242. font=("宋体", self.font_size_title, "bold"), command=self.batchy_button_event)
  243. self.batchy_button.place(x=7, y=7)
  244. self.batchybutton_canvas.place(x=50, y=200)
  245. self.paramvalue_canvas = Canvas(self.order_frame, bg='PaleGreen', relief=SOLID, borderwidth=1,
  246. width=650, height=400)
  247. self.paramvalue_canvas.place(x=250, y=50)
  248. self.param17700_title = Label(self.paramvalue_canvas, text="17700参数", fg='blue',
  249. font=("宋体", self.font_size_text),
  250. bg="PaleGreen", anchor='w')
  251. self.param17700_title.place(x=120, y=8)
  252. self.param17720_title = Label(self.paramvalue_canvas, text="17720参数", fg='blue',
  253. font=("宋体", self.font_size_text),
  254. bg="PaleGreen", anchor='w')
  255. self.param17720_title.place(x=440, y=8)
  256. self.param17700starttitle = Label(self.paramvalue_canvas, text="启动延时:", fg='blue',
  257. font=("宋体", self.font_size_text),
  258. bg="PaleGreen", anchor='e', width=10)
  259. self.param17700starttitle.place(x=30, y=50)
  260. self.param17700_start = Label(self.paramvalue_canvas, textvariable=self.user_var.startdelay_17700_str,
  261. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  262. width=10)
  263. self.param17700_start.bind("<Double-Button-1>",
  264. lambda event: self.param_double_event(event, 'startuptime_17700',
  265. self.user_var.startdelay_17700_str))
  266. self.param17700_start.place(x=120, y=50)
  267. self.param17700startunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  268. font=("宋体", self.font_size_text),
  269. bg="PaleGreen", anchor='w', width=8)
  270. self.param17700startunit.place(x=220, y=50)
  271. self.param17700airtimetitle = Label(self.paramvalue_canvas, text="充气时间:", fg='blue',
  272. font=("宋体", self.font_size_text), width=10,
  273. bg="PaleGreen", anchor='e')
  274. self.param17700airtimetitle.place(x=30, y=80)
  275. self.param17700_airtime = Label(self.paramvalue_canvas, textvariable=self.user_var.airtime_17700_str,
  276. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c', width=10)
  277. self.param17700_airtime.bind("<Double-Button-1>",
  278. lambda event: self.param_double_event(event, 'airtime_17700',
  279. self.user_var.airtime_17700_str))
  280. self.param17700_airtime.place(x=120, y=80)
  281. self.param17700_airtimeunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  282. font=("宋体", self.font_size_text),
  283. bg="PaleGreen", anchor='w', width=8)
  284. self.param17700_airtimeunit.place(x=220, y=80)
  285. self.param17700presstimetitle = Label(self.paramvalue_canvas, text="保压时间:", fg='blue',
  286. font=("宋体", self.font_size_text), width=10,
  287. bg="PaleGreen", anchor='e')
  288. self.param17700presstimetitle.place(x=30, y=110)
  289. self.param17700_presstime = Label(self.paramvalue_canvas, textvariable=self.user_var.presstime_17700_str,
  290. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c', width=10)
  291. self.param17700_presstime.bind("<Double-Button-1>",
  292. lambda event: self.param_double_event(event, 'presstime_17700',
  293. self.user_var.presstime_17700_str))
  294. self.param17700_presstime.place(x=120, y=110)
  295. self.param17700_presstimeunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  296. font=("宋体", self.font_size_text),
  297. bg="PaleGreen", anchor='w', width=8)
  298. self.param17700_presstimeunit.place(x=220, y=110)
  299. self.param17700testtimetitle = Label(self.paramvalue_canvas, text="测试时间:", fg='blue',
  300. font=("宋体", self.font_size_text), width=10,
  301. bg="PaleGreen", anchor='e')
  302. self.param17700testtimetitle.place(x=30, y=140)
  303. self.param17700_testtime = Label(self.paramvalue_canvas, textvariable=self.user_var.testtime_17700_str,
  304. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  305. width=10)
  306. self.param17700_testtime.bind("<Double-Button-1>",
  307. lambda event: self.param_double_event(event, 'testtime_17700',
  308. self.user_var.testtime_17700_str))
  309. self.param17700_testtime.place(x=120, y=140)
  310. self.param17700_testtimeunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  311. font=("宋体", self.font_size_text),
  312. bg="PaleGreen", anchor='w', width=8)
  313. self.param17700_testtimeunit.place(x=220, y=140)
  314. self.param17700exhausttitle = Label(self.paramvalue_canvas, text="排气时间:", fg='blue',
  315. font=("宋体", self.font_size_text), width=10,
  316. bg="PaleGreen", anchor='e')
  317. self.param17700exhausttitle.place(x=30, y=170)
  318. self.param17700_exhaust = Label(self.paramvalue_canvas, textvariable=self.user_var.exhaust_17700_str,
  319. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  320. width=10)
  321. self.param17700_exhaust.bind("<Double-Button-1>",
  322. lambda event: self.param_double_event(event, 'exhaust_17700',
  323. self.user_var.exhaust_17700_str))
  324. self.param17700_exhaust.place(x=120, y=170)
  325. self.param17700_exhaustunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  326. font=("宋体", self.font_size_text),
  327. bg="PaleGreen", anchor='w', width=8)
  328. self.param17700_exhaustunit.place(x=220, y=170)
  329. self.param17700maxpresstitle = Label(self.paramvalue_canvas, text="最大压力:", fg='blue',
  330. font=("宋体", self.font_size_text), width=10,
  331. bg="PaleGreen", anchor='e')
  332. self.param17700maxpresstitle.place(x=30, y=200)
  333. self.param17700_maxpress= Label(self.paramvalue_canvas, textvariable=self.user_var.maxpress_17700_str,
  334. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  335. width=10)
  336. self.param17700_maxpress.bind("<Double-Button-1>",
  337. lambda event: self.param_double_event(event, 'maxpress_17700',
  338. self.user_var.maxpress_17700_str))
  339. self.param17700_maxpress.place(x=120, y=200)
  340. self.param17700_maxpressunit = Label(self.paramvalue_canvas, text="Kpa", fg='blue',
  341. font=("宋体", self.font_size_text),
  342. bg="PaleGreen", anchor='w', width=8)
  343. self.param17700_maxpressunit.place(x=220, y=200)
  344. self.param17700minpresstitle = Label(self.paramvalue_canvas, text="最小压力:", fg='blue',
  345. font=("宋体", self.font_size_text), width=10,
  346. bg="PaleGreen", anchor='e')
  347. self.param17700minpresstitle.place(x=30, y=230)
  348. self.param17700_minpress = Label(self.paramvalue_canvas, textvariable=self.user_var.minpress_17700_str,
  349. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  350. width=10)
  351. self.param17700_minpress.bind("<Double-Button-1>",
  352. lambda event: self.param_double_event(event, 'minpress_17700',
  353. self.user_var.minpress_17700_str))
  354. self.param17700_minpress.place(x=120, y=230)
  355. self.param17700_minpressunit = Label(self.paramvalue_canvas, text="Kpa", fg='blue',
  356. font=("宋体", self.font_size_text),
  357. bg="PaleGreen", anchor='w', width=8)
  358. self.param17700_minpressunit.place(x=220, y=230)
  359. self.param17700setpresstitle = Label(self.paramvalue_canvas, text="设定压力:", fg='blue',
  360. font=("宋体", self.font_size_text), width=10,
  361. bg="PaleGreen", anchor='e')
  362. self.param17700setpresstitle.place(x=30, y=260)
  363. self.param17700_setpress = Label(self.paramvalue_canvas, textvariable=self.user_var.setpress_17700_str,
  364. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  365. width=10)
  366. self.param17700_setpress.bind("<Double-Button-1>",
  367. lambda event: self.param_double_event(event, 'setpress_17700',
  368. self.user_var.setpress_17700_str))
  369. self.param17700_setpress.place(x=120, y=260)
  370. self.param17700_setpressunit = Label(self.paramvalue_canvas, text="Kpa", fg='blue',
  371. font=("宋体", self.font_size_text),
  372. bg="PaleGreen", anchor='w', width=8)
  373. self.param17700_setpressunit.place(x=220, y=260)
  374. self.param17700capacitytitle = Label(self.paramvalue_canvas, text="容积:", fg='blue',
  375. font=("宋体", self.font_size_text), width=10,
  376. bg="PaleGreen", anchor='e')
  377. self.param17700capacitytitle.place(x=30, y=290)
  378. self.param17700_capacity = Label(self.paramvalue_canvas, textvariable=self.user_var.capacity_17700_str,
  379. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  380. width=10)
  381. self.param17700_capacity.bind("<Double-Button-1>",
  382. lambda event: self.param_double_event(event, 'capacity_17700',
  383. self.user_var.capacity_17700_str))
  384. self.param17700_capacity.place(x=120, y=290)
  385. self.param17700_capacityunit = Label(self.paramvalue_canvas, text="ml", fg='blue',
  386. font=("宋体", self.font_size_text),
  387. bg="PaleGreen", anchor='w', width=8)
  388. self.param17700_capacityunit.place(x=220, y=290)
  389. self.param17700posthresholdtitle = Label(self.paramvalue_canvas, text="正阈值:", fg='blue',
  390. font=("宋体", self.font_size_text), width=10,
  391. bg="PaleGreen", anchor='e')
  392. self.param17700posthresholdtitle.place(x=30, y=320)
  393. self.param17700_posthreshold = Label(self.paramvalue_canvas, textvariable=self.user_var.posthreshold_17700_str,
  394. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  395. width=10)
  396. self.param17700_posthreshold.bind("<Double-Button-1>",
  397. lambda event: self.param_double_event(event, 'posthreshold_17700',
  398. self.user_var.posthreshold_17700_str))
  399. self.param17700_posthreshold.place(x=120, y=320)
  400. self.param17700_posthresholdunit = Label(self.paramvalue_canvas, text="ml/min", fg='blue',
  401. font=("宋体", self.font_size_text),
  402. bg="PaleGreen", anchor='w', width=8)
  403. self.param17700_posthresholdunit.place(x=220, y=320)
  404. self.param17700pnegthresholdtitle = Label(self.paramvalue_canvas, text="负阈值:", fg='blue',
  405. font=("宋体", self.font_size_text), width=10,
  406. bg="PaleGreen", anchor='e')
  407. self.param17700pnegthresholdtitle.place(x=30, y=350)
  408. self.param17700_pnegthreshold = Label(self.paramvalue_canvas, textvariable=self.user_var.pnegthreshold_17700_str,
  409. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  410. width=10)
  411. self.param17700_pnegthreshold.bind("<Double-Button-1>",
  412. lambda event: self.param_double_event(event, 'pnegthreshold_17700',
  413. self.user_var.pnegthreshold_17700_str))
  414. self.param17700_pnegthreshold.place(x=120, y=350)
  415. self.param17700_pnegthresholdunit = Label(self.paramvalue_canvas, text="ml/min", fg='blue',
  416. font=("宋体", self.font_size_text),
  417. bg="PaleGreen", anchor='w', width=8)
  418. self.param17700_pnegthresholdunit.place(x=220, y=350)
  419. self.param17720starttitle = Label(self.paramvalue_canvas, text="启动延时:", fg='blue',
  420. font=("宋体", self.font_size_text),
  421. bg="PaleGreen", anchor='e', width=10)
  422. self.param17720starttitle.place(x=350, y=50)
  423. self.param17720_start = Label(self.paramvalue_canvas, textvariable=self.user_var.startdelay_17720_str,
  424. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  425. width=10)
  426. self.param17720_start.bind("<Double-Button-1>",
  427. lambda event: self.param_double_event(event, 'startuptime_17720',
  428. self.user_var.startdelay_17720_str))
  429. self.param17720_start.place(x=440, y=50)
  430. self.param17720startunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  431. font=("宋体", self.font_size_text),
  432. bg="PaleGreen", anchor='w', width=8)
  433. self.param17720startunit.place(x=540, y=50)
  434. self.param17720airtimetitle = Label(self.paramvalue_canvas, text="充气时间:", fg='blue',
  435. font=("宋体", self.font_size_text), width=10,
  436. bg="PaleGreen", anchor='e')
  437. self.param17720airtimetitle.place(x=350, y=80)
  438. self.param17720_airtime = Label(self.paramvalue_canvas, textvariable=self.user_var.airtime_17720_str,
  439. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  440. width=10)
  441. self.param17720_airtime.bind("<Double-Button-1>",
  442. lambda event: self.param_double_event(event, 'airtime_17720',
  443. self.user_var.airtime_17720_str))
  444. self.param17720_airtime.place(x=440, y=80)
  445. self.param17720_airtimeunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  446. font=("宋体", self.font_size_text),
  447. bg="PaleGreen", anchor='w', width=8)
  448. self.param17720_airtimeunit.place(x=540, y=80)
  449. self.param17720presstimetitle = Label(self.paramvalue_canvas, text="保压时间:", fg='blue',
  450. font=("宋体", self.font_size_text), width=10,
  451. bg="PaleGreen", anchor='e')
  452. self.param17720presstimetitle.place(x=350, y=110)
  453. self.param17720_presstime = Label(self.paramvalue_canvas, textvariable=self.user_var.presstime_17720_str,
  454. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  455. width=10)
  456. self.param17720_presstime.bind("<Double-Button-1>",
  457. lambda event: self.param_double_event(event, 'presstime_17720',
  458. self.user_var.presstime_17720_str))
  459. self.param17720_presstime.place(x=440, y=110)
  460. self.param17720_presstimeunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  461. font=("宋体", self.font_size_text),
  462. bg="PaleGreen", anchor='w', width=8)
  463. self.param17720_presstimeunit.place(x=540, y=110)
  464. self.param17720testtimetitle = Label(self.paramvalue_canvas, text="测试时间:", fg='blue',
  465. font=("宋体", self.font_size_text), width=10,
  466. bg="PaleGreen", anchor='e')
  467. self.param17720testtimetitle.place(x=350, y=140)
  468. self.param17720_testtime = Label(self.paramvalue_canvas, textvariable=self.user_var.testtime_17720_str,
  469. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  470. width=10)
  471. self.param17720_testtime.bind("<Double-Button-1>",
  472. lambda event: self.param_double_event(event, 'testtime_17720',
  473. self.user_var.testtime_17720_str))
  474. self.param17720_testtime.place(x=440, y=140)
  475. self.param17720_testtimeunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  476. font=("宋体", self.font_size_text),
  477. bg="PaleGreen", anchor='w', width=8)
  478. self.param17720_testtimeunit.place(x=540, y=140)
  479. self.param17720exhausttitle = Label(self.paramvalue_canvas, text="排气时间:", fg='blue',
  480. font=("宋体", self.font_size_text), width=10,
  481. bg="PaleGreen", anchor='e')
  482. self.param17720exhausttitle.place(x=350, y=170)
  483. self.param17720_exhaust = Label(self.paramvalue_canvas, textvariable=self.user_var.exhaust_17720_str,
  484. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  485. width=10)
  486. self.param17720_exhaust.bind("<Double-Button-1>",
  487. lambda event: self.param_double_event(event, 'exhaust_17720',
  488. self.user_var.exhaust_17720_str))
  489. self.param17720_exhaust.place(x=440, y=170)
  490. self.param17720_exhaustunit = Label(self.paramvalue_canvas, text="sec", fg='blue',
  491. font=("宋体", self.font_size_text),
  492. bg="PaleGreen", anchor='w', width=8)
  493. self.param17720_exhaustunit.place(x=540, y=170)
  494. self.param17720maxpresstitle = Label(self.paramvalue_canvas, text="最大压力:", fg='blue',
  495. font=("宋体", self.font_size_text), width=10,
  496. bg="PaleGreen", anchor='e')
  497. self.param17720maxpresstitle.place(x=350, y=200)
  498. self.param17720_maxpress = Label(self.paramvalue_canvas, textvariable=self.user_var.maxpress_17720_str,
  499. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  500. width=10)
  501. self.param17720_maxpress.bind("<Double-Button-1>",
  502. lambda event: self.param_double_event(event, 'maxpress_17720',
  503. self.user_var.maxpress_17720_str))
  504. self.param17720_maxpress.place(x=440, y=200)
  505. self.param17720_maxpressunit = Label(self.paramvalue_canvas, text="Kpa", fg='blue',
  506. font=("宋体", self.font_size_text),
  507. bg="PaleGreen", anchor='w', width=8)
  508. self.param17720_maxpressunit.place(x=540, y=200)
  509. self.param17720minpresstitle = Label(self.paramvalue_canvas, text="最小压力:", fg='blue',
  510. font=("宋体", self.font_size_text), width=10,
  511. bg="PaleGreen", anchor='e')
  512. self.param17720minpresstitle.place(x=350, y=230)
  513. self.param17720_minpress = Label(self.paramvalue_canvas, textvariable=self.user_var.minpress_17720_str,
  514. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  515. width=10)
  516. self.param17720_minpress.bind("<Double-Button-1>",
  517. lambda event: self.param_double_event(event, 'minpress_17720',
  518. self.user_var.minpress_17720_str))
  519. self.param17720_minpress.place(x=440, y=230)
  520. self.param17720_minpressunit = Label(self.paramvalue_canvas, text="Kpa", fg='blue',
  521. font=("宋体", self.font_size_text),
  522. bg="PaleGreen", anchor='w', width=8)
  523. self.param17720_minpressunit.place(x=540, y=230)
  524. self.param17720setpresstitle = Label(self.paramvalue_canvas, text="设定压力:", fg='blue',
  525. font=("宋体", self.font_size_text), width=10,
  526. bg="PaleGreen", anchor='e')
  527. self.param17720setpresstitle.place(x=350, y=260)
  528. self.param17720_setpress = Label(self.paramvalue_canvas, textvariable=self.user_var.setpress_17720_str,
  529. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  530. width=10)
  531. self.param17720_setpress.bind("<Double-Button-1>",
  532. lambda event: self.param_double_event(event, 'setpress_17720',
  533. self.user_var.setpress_17720_str))
  534. self.param17720_setpress.place(x=440, y=260)
  535. self.param17720_setpressunit = Label(self.paramvalue_canvas, text="Kpa", fg='blue',
  536. font=("宋体", self.font_size_text),
  537. bg="PaleGreen", anchor='w', width=8)
  538. self.param17720_setpressunit.place(x=540, y=260)
  539. self.param17720capacitytitle = Label(self.paramvalue_canvas, text="容积:", fg='blue',
  540. font=("宋体", self.font_size_text), width=10,
  541. bg="PaleGreen", anchor='e')
  542. self.param17720capacitytitle.place(x=350, y=290)
  543. self.param17720_capacity = Label(self.paramvalue_canvas, textvariable=self.user_var.capacity_17720_str,
  544. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  545. width=10)
  546. self.param17720_capacity.bind("<Double-Button-1>",
  547. lambda event: self.param_double_event(event, 'capacity_17720',
  548. self.user_var.capacity_17720_str))
  549. self.param17720_capacity.place(x=440, y=290)
  550. self.param17720_capacityunit = Label(self.paramvalue_canvas, text="ml", fg='blue',
  551. font=("宋体", self.font_size_text),
  552. bg="PaleGreen", anchor='w', width=8)
  553. self.param17720_capacityunit.place(x=540, y=290)
  554. self.param17720posthresholdtitle = Label(self.paramvalue_canvas, text="正阈值:", fg='blue',
  555. font=("宋体", self.font_size_text), width=10,
  556. bg="PaleGreen", anchor='e')
  557. self.param17720posthresholdtitle.place(x=350, y=320)
  558. self.param17720_posthreshold = Label(self.paramvalue_canvas, textvariable=self.user_var.posthreshold_17720_str,
  559. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  560. width=10)
  561. self.param17720_posthreshold.bind("<Double-Button-1>",
  562. lambda event: self.param_double_event(event, 'posthreshold_17720',
  563. self.user_var.posthreshold_17720_str))
  564. self.param17720_posthreshold.place(x=440, y=320)
  565. self.param17720_posthresholdunit = Label(self.paramvalue_canvas, text="ml/min", fg='blue',
  566. font=("宋体", self.font_size_text),
  567. bg="PaleGreen", anchor='w', width=8)
  568. self.param17720_posthresholdunit.place(x=540, y=320)
  569. self.param17720pnegthresholdtitle = Label(self.paramvalue_canvas, text="负阈值:", fg='blue',
  570. font=("宋体", self.font_size_text), width=10,
  571. bg="PaleGreen", anchor='e')
  572. self.param17720pnegthresholdtitle.place(x=350, y=350)
  573. self.param17720_pnegthreshold = Label(self.paramvalue_canvas,
  574. textvariable=self.user_var.pnegthreshold_17720_str,
  575. fg='PaleGreen', font=("宋体", self.font_size_text), bg="black", anchor='c',
  576. width=10)
  577. self.param17720_pnegthreshold.bind("<Double-Button-1>",
  578. lambda event: self.param_double_event(event,
  579. 'pnegthreshold_17720',
  580. self.user_var.pnegthreshold_17720_str))
  581. self.param17720_pnegthreshold.place(x=440, y=350)
  582. self.param17720_pnegthresholdunit = Label(self.paramvalue_canvas, text="ml/min", fg='blue',
  583. font=("宋体", self.font_size_text),
  584. bg="PaleGreen", anchor='w', width=8)
  585. self.param17720_pnegthresholdunit.place(x=540, y=350)