Hello.py 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. from multiprocessing import Process
  2. def painting_board():
  3. from CGB import draw_main
  4. draw_main()
  5. def Draw():
  6. global top, HTB
  7. HTB = Process(target=painting_board)
  8. HTB.start()
  9. def Data_Science():
  10. from Data_Science import machine_learning
  11. machine_learning()
  12. def SJKX():
  13. global top, SJ
  14. SJ = Process(target=Data_Science)
  15. SJ.start()
  16. def Function_mapping():
  17. from HSCH import function_mapping
  18. function_mapping()
  19. def Hsch():
  20. global top, CH
  21. CH = Process(target=Function_mapping)
  22. CH.start()
  23. def Function_factory():
  24. from HSCH import function_factory_main
  25. function_factory_main()
  26. def HSGC():
  27. global top, HsGC
  28. HsGC = Process(target=Function_factory)
  29. HsGC.start()
  30. def Algebraic_factory():
  31. from DSGC import algebraic_factory_main
  32. algebraic_factory_main()
  33. def Dsgc():
  34. global top, DsGC
  35. DsGC = Process(target=Algebraic_factory)
  36. DsGC.start()
  37. def Machine_Learning():
  38. from Machine_learning_analysis import machine_learning
  39. machine_learning()
  40. def MLA():
  41. global top, Mla
  42. Mla = Process(target=Machine_Learning)
  43. Mla.start()
  44. def Git_Ctrl():
  45. from Git_controller import git_main
  46. git_main()
  47. def GIT_Ctrl():
  48. global top, Git_Ctrl
  49. Git = Process(target=Git_Ctrl)
  50. Git.start()
  51. def Crawler_Main():
  52. from Crawler import crawler_main
  53. crawler_main()
  54. def Crawlef_Run():
  55. global top, crawlef
  56. crawlef = Process(target=Crawler_Main)
  57. crawlef.start()
  58. def Main():
  59. global top
  60. import tkinter
  61. import tkinter.font as tkFont
  62. from PIL import ImageTk, Image
  63. from New_TK import DragWindow
  64. print('加载完毕')
  65. top = DragWindow(alpha=0.97, width=1200, height=800)
  66. ft = tkFont.Font(family='Comic Sans MS', size=20, weight=tkFont.BOLD)
  67. ft1 = tkFont.Font(family='Comic Sans MS', size=16, weight=tkFont.BOLD)
  68. ft2 = tkFont.Font(family='Comic Sans MS', size=10)
  69. ft3 = tkFont.Font(family='Comic Sans MS', size=50, weight=tkFont.BOLD)
  70. top.title('')
  71. top.resizable(width=False, height=False)
  72. top.geometry(f'1200x800+30+30')
  73. # 渲染白色
  74. F1 = tkinter.Frame(top, width=1200, height=800, bg='#FFFFFF')
  75. F1.pack()
  76. # 图片
  77. canvas = tkinter.Canvas(
  78. F1,
  79. bd=0,
  80. width=1000,
  81. height=800,
  82. highlightthickness=0)
  83. photo = ImageTk.PhotoImage(Image.open('Pic/Night2.jpg'))
  84. canvas.create_image(500, 400, image=photo)
  85. canvas.grid(column=1, row=0, sticky=tkinter.S + tkinter.N, rowspan=20)
  86. abg = '#F0FFFF'
  87. bg = '#FFFFFF'
  88. bc = 'tcross'
  89. # 标题
  90. tkinter.Label(
  91. F1,
  92. text='CoTan~科学计算',
  93. width=20,
  94. bg='#FFFFFF',
  95. font=ft).grid(
  96. column=0,
  97. row=0,
  98. sticky=tkinter.N) # 设置说明
  99. tkinter.Label(
  100. F1,
  101. text='寄忆学术',
  102. bg=abg,
  103. font=ft1).grid(
  104. column=0,
  105. row=1,
  106. sticky=tkinter.W +
  107. tkinter.E)
  108. tkinter.Button(
  109. F1,
  110. text='我的寄忆',
  111. cursor=bc,
  112. height=2,
  113. font=ft2,
  114. bg=bg,
  115. activebackground=abg,
  116. bd=0,
  117. justify=tkinter.LEFT).grid(
  118. column=0,
  119. row=2,
  120. sticky=tkinter.N +
  121. tkinter.E +
  122. tkinter.W)
  123. tkinter.Button(
  124. F1,
  125. text='寄忆草稿版',
  126. cursor=bc,
  127. command=Draw,
  128. height=2,
  129. font=ft2,
  130. bg=bg,
  131. activebackground=abg,
  132. bd=0,
  133. justify=tkinter.LEFT).grid(
  134. column=0,
  135. row=3,
  136. sticky=tkinter.N +
  137. tkinter.E +
  138. tkinter.W)
  139. tkinter.Button(
  140. F1,
  141. text='自动化网页',
  142. cursor=bc,
  143. command=Crawlef_Run,
  144. height=1,
  145. font=ft2,
  146. bg=bg,
  147. activebackground=abg,
  148. bd=0,
  149. justify=tkinter.LEFT).grid(
  150. column=0,
  151. row=4,
  152. sticky=tkinter.N +
  153. tkinter.E +
  154. tkinter.W)
  155. tkinter.Button(
  156. F1,
  157. text='Git仓库控制器',
  158. cursor=bc,
  159. command=GIT_Ctrl,
  160. height=1,
  161. font=ft2,
  162. bg=bg,
  163. activebackground=abg,
  164. bd=0,
  165. justify=tkinter.LEFT).grid(
  166. column=0,
  167. row=5,
  168. sticky=tkinter.N +
  169. tkinter.E +
  170. tkinter.W)
  171. abg = '#FFFAFA'
  172. tkinter.Label(
  173. F1,
  174. text='数学系统',
  175. bg=abg,
  176. font=ft1).grid(
  177. column=0,
  178. row=6,
  179. sticky=tkinter.W +
  180. tkinter.E)
  181. tkinter.Button(
  182. F1,
  183. text='函数测绘',
  184. cursor=bc,
  185. command=Hsch,
  186. height=2,
  187. font=ft2,
  188. bg=bg,
  189. activebackground=abg,
  190. bd=0,
  191. justify=tkinter.LEFT).grid(
  192. column=0,
  193. row=7,
  194. sticky=tkinter.N +
  195. tkinter.E +
  196. tkinter.W)
  197. tkinter.Button(
  198. F1,
  199. text='函数工厂',
  200. cursor=bc,
  201. command=HSGC,
  202. height=2,
  203. font=ft2,
  204. bg=bg,
  205. activebackground=abg,
  206. bd=0,
  207. justify=tkinter.LEFT).grid(
  208. column=0,
  209. row=8,
  210. sticky=tkinter.N +
  211. tkinter.E +
  212. tkinter.W)
  213. tkinter.Button(
  214. F1,
  215. text='代数工厂',
  216. cursor=bc,
  217. command=Dsgc,
  218. height=2,
  219. font=ft2,
  220. bg=bg,
  221. activebackground=abg,
  222. bd=0,
  223. justify=tkinter.LEFT).grid(
  224. column=0,
  225. row=9,
  226. sticky=tkinter.N +
  227. tkinter.E +
  228. tkinter.W)
  229. tkinter.Button(
  230. F1,
  231. text='数据科学',
  232. cursor=bc,
  233. command=SJKX,
  234. height=1,
  235. font=ft2,
  236. bg=bg,
  237. activebackground=abg,
  238. bd=0,
  239. justify=tkinter.LEFT).grid(
  240. column=0,
  241. row=10,
  242. sticky=tkinter.N +
  243. tkinter.E +
  244. tkinter.W)
  245. tkinter.Button(
  246. F1,
  247. text='机器学习',
  248. cursor=bc,
  249. command=MLA,
  250. height=1,
  251. font=ft2,
  252. bg=bg,
  253. activebackground=abg,
  254. bd=0,
  255. justify=tkinter.LEFT).grid(
  256. column=0,
  257. row=11,
  258. sticky=tkinter.N +
  259. tkinter.E +
  260. tkinter.W)
  261. abg = '#F5FFFA'
  262. tkinter.Label(
  263. F1,
  264. text='物化系统',
  265. bg=abg,
  266. font=ft1).grid(
  267. column=0,
  268. row=12,
  269. sticky=tkinter.W +
  270. tkinter.E)
  271. tkinter.Button(
  272. F1,
  273. text='几何车间',
  274. cursor=bc,
  275. height=2,
  276. font=ft2,
  277. bg=bg,
  278. activebackground=abg,
  279. bd=0,
  280. justify=tkinter.LEFT).grid(
  281. column=0,
  282. row=13,
  283. sticky=tkinter.N +
  284. tkinter.E +
  285. tkinter.W)
  286. tkinter.Button(
  287. F1,
  288. text='物理车间',
  289. cursor=bc,
  290. height=2,
  291. font=ft2,
  292. bg=bg,
  293. activebackground=abg,
  294. bd=0,
  295. justify=tkinter.LEFT).grid(
  296. column=0,
  297. row=14,
  298. sticky=tkinter.N +
  299. tkinter.E +
  300. tkinter.W)
  301. tkinter.Button(
  302. F1,
  303. text='化学车间',
  304. cursor=bc,
  305. height=1,
  306. font=ft2,
  307. bg=bg,
  308. activebackground=abg,
  309. bd=0,
  310. justify=tkinter.LEFT).grid(
  311. column=0,
  312. row=15,
  313. sticky=tkinter.N +
  314. tkinter.E +
  315. tkinter.W)
  316. tkinter.Button(
  317. F1,
  318. text='实验室管理',
  319. cursor=bc,
  320. height=1,
  321. font=ft2,
  322. bg=bg,
  323. activebackground=abg,
  324. bd=0,
  325. justify=tkinter.LEFT).grid(
  326. column=0,
  327. row=16,
  328. sticky=tkinter.N +
  329. tkinter.E +
  330. tkinter.W)
  331. abg = '#F8F8FF'
  332. tkinter.Label(
  333. F1,
  334. text='其他工具',
  335. bg=abg,
  336. font=ft1).grid(
  337. column=0,
  338. row=17,
  339. sticky=tkinter.W +
  340. tkinter.E)
  341. tkinter.Button(
  342. F1,
  343. text='系统扩展',
  344. cursor=bc,
  345. height=1,
  346. font=ft2,
  347. bg=bg,
  348. activebackground=abg,
  349. bd=0,
  350. justify=tkinter.LEFT).grid(
  351. column=0,
  352. row=18,
  353. sticky=tkinter.N +
  354. tkinter.E +
  355. tkinter.W)
  356. tkinter.Button(
  357. F1,
  358. text='Tensorflew深度学习',
  359. cursor=bc,
  360. height=1,
  361. font=ft2,
  362. bg=bg,
  363. activebackground=abg,
  364. bd=0,
  365. justify=tkinter.LEFT).grid(
  366. column=0,
  367. row=19,
  368. sticky=tkinter.N +
  369. tkinter.E +
  370. tkinter.W)
  371. tkinter.Label(
  372. F1,
  373. text='',
  374. bg='#FFFFFF',
  375. font=ft1,
  376. height=5).grid(
  377. column=0,
  378. row=20,
  379. sticky=tkinter.W +
  380. tkinter.E)
  381. canvas.create_text(500, 750, text='CoTan~别来无恙', font=ft3, fill='#FFFFE0')
  382. top.mainloop()
  383. if __name__ == "__main__":
  384. Main()