Hello.py 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. from multiprocessing import Process
  2. def painting_board():
  3. from CGB import Draw
  4. Draw()
  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 Func_Control
  18. Func_Control()
  19. def Hsch():
  20. global top,CH
  21. CH = Process(target=Function_mapping)
  22. CH.start()
  23. def Function_factory():
  24. from HSCH import Advanced_Control
  25. Advanced_Control()
  26. def HSGC():
  27. global top,HsGC
  28. HsGC = Process(target=Function_factory)
  29. HsGC.start()
  30. def Algebraic_factory():
  31. from DSGC import Alg
  32. Alg()
  33. def Dsgc():
  34. global top,DsGC
  35. DsGC = Process(target=Algebraic_factory)
  36. DsGC.start()
  37. def Main():
  38. global top
  39. import tkinter
  40. import tkinter.font as tkFont
  41. from PIL import ImageTk, Image
  42. from New_TK import DragWindow
  43. print('加载完毕')
  44. top = DragWindow(alpha=0.97,width=1200,height=800)
  45. ft = tkFont.Font(family='Comic Sans MS', size=20, weight=tkFont.BOLD)
  46. ft1 = tkFont.Font(family='Comic Sans MS', size=16, weight=tkFont.BOLD)
  47. ft2 = tkFont.Font(family='Comic Sans MS', size=10)
  48. ft3 = tkFont.Font(family='Comic Sans MS', size=50, weight=tkFont.BOLD)
  49. top.title('')
  50. top.resizable(width=False, height=False)
  51. top.geometry(f'1200x800+30+30')
  52. #渲染白色
  53. F1 = tkinter.Frame(top, width=1200, height=800, bg='#FFFFFF')
  54. F1.pack()
  55. #图片
  56. canvas = tkinter.Canvas(F1,bd=0, width=1000, height=800,highlightthickness=0)
  57. photo = ImageTk.PhotoImage(Image.open('Pic/Night2.jpg'))
  58. canvas.create_image(500, 400, image=photo)
  59. canvas.grid(column=1, row=0,sticky=tkinter.S + tkinter.N,rowspan =20)
  60. abg = '#F0FFFF'
  61. bg = '#FFFFFF'
  62. bc = 'tcross'
  63. #标题
  64. tkinter.Label(F1, text='CoTan~NOTE', width=20,bg='#FFFFFF', font=ft).grid(column=0, row=0,sticky=tkinter.N) # 设置说明
  65. tkinter.Label(F1, text='私人笔记',bg=abg,font=ft1).grid(column=0, row=1,sticky=tkinter.W + tkinter.E)
  66. tkinter.Button(F1,text='Markdown笔记',cursor=bc,height=2,font=ft2,bg=bg,activebackground=abg,bd=0,justify=tkinter.LEFT).grid(column =0,row = 2,sticky=tkinter.N + tkinter.E + tkinter.W)
  67. tkinter.Button(F1, text='画图板',cursor=bc,command=Draw, height=2, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=3,sticky=tkinter.N + tkinter.E + tkinter.W)
  68. tkinter.Button(F1, text='爬虫系统',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=4,sticky=tkinter.N + tkinter.E + tkinter.W)
  69. tkinter.Button(F1, text='我的寄忆',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=5,sticky=tkinter.N + tkinter.E + tkinter.W)
  70. abg = '#FFFAFA'
  71. tkinter.Label(F1, text='数学系统', bg=abg, font=ft1).grid(column=0, row=6,sticky=tkinter.W + tkinter.E)
  72. tkinter.Button(F1,text='函数测绘',cursor=bc,command=Hsch,height=2,font=ft2,bg=bg,activebackground=abg,bd=0,justify=tkinter.LEFT).grid(column =0,row = 7,sticky=tkinter.N + tkinter.E + tkinter.W)
  73. tkinter.Button(F1, text='函数工厂',cursor=bc,command=HSGC, height=2, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=8,sticky=tkinter.N + tkinter.E + tkinter.W)
  74. tkinter.Button(F1, text='代数工厂',cursor=bc,command=Dsgc, height=2, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=9,sticky=tkinter.N + tkinter.E + tkinter.W)
  75. tkinter.Button(F1, text='数据科学',cursor=bc,command=SJKX, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=10,sticky=tkinter.N + tkinter.E + tkinter.W)
  76. tkinter.Button(F1, text='机器学习',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=11,sticky=tkinter.N + tkinter.E + tkinter.W)
  77. abg='#F5FFFA'
  78. tkinter.Label(F1, text='物化系统', bg=abg, font=ft1).grid(column=0, row=12, sticky=tkinter.W + tkinter.E)
  79. tkinter.Button(F1, text='平面物体分析',cursor=bc, height=2, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=13,
  80. sticky=tkinter.N + tkinter.E + tkinter.W)
  81. tkinter.Button(F1, text='平面受力分析',cursor=bc, height=2, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=14,
  82. sticky=tkinter.N + tkinter.E + tkinter.W)
  83. tkinter.Button(F1, text='实验数据拟合',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0,
  84. row=15,
  85. sticky=tkinter.N + tkinter.E + tkinter.W)
  86. tkinter.Button(F1, text='化学反应预测',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0,
  87. row=16,
  88. sticky=tkinter.N + tkinter.E + tkinter.W)
  89. abg = '#F8F8FF'
  90. tkinter.Label(F1, text='其他工具', bg=abg, font=ft1).grid(column=0, row=17, sticky=tkinter.W + tkinter.E)
  91. tkinter.Button(F1, text='系统扩展',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=18,
  92. sticky=tkinter.N + tkinter.E + tkinter.W)
  93. tkinter.Button(F1, text='Tensorflew深度学习',cursor=bc, height=1, font=ft2, bg=bg,activebackground=abg, bd=0, justify=tkinter.LEFT).grid(column=0, row=19,
  94. sticky=tkinter.N + tkinter.E + tkinter.W)
  95. tkinter.Label(F1, text='', bg='#FFFFFF', font=ft1,height=5).grid(column=0, row=20, sticky=tkinter.W + tkinter.E)
  96. canvas.create_text(500,750,text='CoTan~别来无恙',font=ft3,fill='#FFFFE0')
  97. top.mainloop()
  98. if __name__ == "__main__":
  99. Main()