Browse Source

PEP8 代码整理完成:1.变量全局化;2.变量名格式化;3.import格式化;4.PEP8标准化

Huan 5 years ago
parent
commit
1bb73853c0

+ 47 - 87
CGB/TK.py

@@ -1,8 +1,22 @@
 from tkinter.colorchooser import askcolor
 from tkinter.colorchooser import askcolor
 from tkinter.filedialog import asksaveasfile
 from tkinter.filedialog import asksaveasfile
 import tkinter.messagebox
 import tkinter.messagebox
+
 from CGB import TK_HS
 from CGB import TK_HS
 
 
+background_image = None
+func_list = {}
+coordinate_system_drawing_method = None
+background_color = None
+pen_weight = None
+pen_color = None
+increasing_color = None
+subtraction_color = None
+save_dir = None
+gui_width = 20
+gui_height = 3
+span = None
+SCREEN = tkinter.Tk()  # 设置屏幕
 help_doc = """
 help_doc = """
 *快捷键:
 *快捷键:
     d-不用点击左键画线(再次点击关闭)
     d-不用点击左键画线(再次点击关闭)
@@ -203,88 +217,7 @@ def close():  # 关闭屏幕事件
 
 
 
 
 def tool_box():
 def tool_box():
-    global pen_color
-    global increasing_color, subtraction_color
     global SCREEN  # 初始化屏幕
     global SCREEN  # 初始化屏幕
-    global pen_weight
-    global background_color
-    global coordinate_system_drawing_method
-    global func_list  # 绘制函数列表
-    global save_dir  # 保存路径
-    global span
-    global pen_weight_input, span_Input  # 定义Enter组件
-    global background_image
-
-    background_image = None
-    func_list = {}
-    coordinate_system_drawing_method = None
-    background_color = None
-    pen_weight = None
-    pen_color = None
-    increasing_color = None
-    subtraction_color = None
-    save_dir = None
-    w_b = 20
-    h_b = 3
-    span = None
-
-    SCREEN = tkinter.Tk()  # 设置屏幕
-    SCREEN.title("")
-    SCREEN.resizable(width=False, height=False)
-    SCREEN.geometry(f"+10+10")
-
-    tkinter.Button(
-        SCREEN, text="选择颜色", command=select_color, width=w_b, height=h_b
-    ).pack()  # 选择颜色组件
-    tkinter.Button(
-        SCREEN, text="选择增函数颜色", command=increasing_func_color, width=w_b, height=1
-    ).pack()  # 选择颜色组件
-    tkinter.Button(
-        SCREEN, text="选择减函数颜色", command=subtraction_func_color, width=w_b, height=1
-    ).pack()  # 选择颜色组件
-    tkinter.Button(
-        SCREEN, text="使用中笔(默认笔)", command=switch_stroke, width=w_b, height=h_b
-    ).pack()  # 切换笔
-    tkinter.Button(
-        SCREEN, text="使用大笔", command=switch_big, width=w_b, height=1
-    ).pack()  # 切换到大笔
-    tkinter.Button(
-        SCREEN, text="使用小笔", command=switch_small, width=w_b, height=1
-    ).pack()  # 切换笔
-    tkinter.Button(
-        SCREEN, text="使用刷子", command=switch_brush, width=w_b, height=1
-    ).pack()  # 切换笔
-    pen_weight_input = tkinter.Entry(SCREEN, width=w_b - 2)
-    pen_weight_input.pack(fill=tkinter.BOTH)
-    tkinter.Button(
-        SCREEN, text="使用自定义大小", command=set_pen, width=w_b, height=1
-    ).pack()  # 切换笔
-    tkinter.Button(
-        SCREEN, text="清空草稿", command=empty, width=w_b, height=h_b
-    ).pack()  # 填充背景
-    tkinter.Button(
-        SCREEN, text="绘制坐标系", command=plot_coordinate, width=w_b, height=h_b
-    ).pack()  # 绘制坐标系
-    tkinter.Button(
-        SCREEN, text="绘制坐标系(小跨度)", command=plot_coordinate_small, width=w_b, height=1
-    ).pack()  # 绘制坐标系
-    tkinter.Button(
-        SCREEN, text="绘制坐标系(大跨度)", command=plot_coordinate_big_span, width=w_b, height=1
-    ).pack()  # 绘制坐标系
-    span_Input = tkinter.Entry(SCREEN, width=w_b - 2)
-    span_Input.pack(fill=tkinter.BOTH)
-    tkinter.Button(
-        SCREEN, text="使用自定义跨度", command=set_span, width=w_b, height=1
-    ).pack()  # 切换笔
-    tkinter.Button(
-        SCREEN, text="绘制函数", command=open_func_box, width=w_b, height=h_b
-    ).pack()
-    tkinter.Button(SCREEN, text="保存", command=choose_save, width=w_b, height=1).pack()
-    tkinter.Button(SCREEN, text="载入", command=choose_open, width=w_b, height=1).pack()
-    tkinter.Button(
-        SCREEN, text="帮助", command=_help, width=w_b, height=1
-    ).pack()  # help是系统保留关键词,用_help代替
-    SCREEN.protocol("WM_DELETE_WINDOW", close)
     SCREEN.mainloop()
     SCREEN.mainloop()
     return [
     return [
         pen_color,
         pen_color,
@@ -298,9 +231,36 @@ def tool_box():
         span,
         span,
         background_image,
         background_image,
     ]
     ]
-    # [0]-笔的颜色
-    # [1]-笔的大小
-    # [2]-背景填充
-    # [3]-坐标系绘制
-    # [4]-函数绘制
-    # [5]-保存
+
+
+SCREEN.title("")
+SCREEN.resizable(width=False, height=False)
+SCREEN.geometry(f"+10+10")
+tkinter.Button(SCREEN, text="选择颜色", command=select_color, width=gui_width, height=gui_height).pack()
+tkinter.Button(SCREEN, text="选择增函数颜色", command=increasing_func_color, width=gui_width, height=1).pack()
+tkinter.Button(SCREEN, text="选择减函数颜色", command=subtraction_func_color, width=gui_width, height=1).pack()
+tkinter.Button(SCREEN, text="使用中笔(默认笔)", command=switch_stroke, width=gui_width, height=gui_height).pack()
+tkinter.Button(SCREEN, text="使用大笔", command=switch_big, width=gui_width, height=1).pack()  # 切换到大笔
+tkinter.Button(SCREEN, text="使用小笔", command=switch_small, width=gui_width, height=1).pack()  # 切换笔
+tkinter.Button(SCREEN, text="使用刷子", command=switch_brush, width=gui_width, height=1).pack()  # 切换笔
+pen_weight_input = tkinter.Entry(SCREEN, width=gui_width - 2)
+pen_weight_input.pack(fill=tkinter.BOTH)
+tkinter.Button(SCREEN, text="使用自定义大小", command=set_pen, width=gui_width, height=1).pack()  # 切换笔
+tkinter.Button(SCREEN, text="清空草稿", command=empty, width=gui_width, height=gui_height).pack()  # 填充背景
+tkinter.Button(SCREEN, text="绘制坐标系", command=plot_coordinate, width=gui_width, height=gui_height).pack()
+tkinter.Button(SCREEN, text="绘制坐标系(小跨度)", command=plot_coordinate_small, width=gui_width, height=1).pack()
+tkinter.Button(
+    SCREEN,
+    text="绘制坐标系(大跨度)",
+    command=plot_coordinate_big_span,
+    width=gui_width,
+    height=1,
+).pack()  # 绘制坐标系
+span_Input = tkinter.Entry(SCREEN, width=gui_width - 2)
+span_Input.pack(fill=tkinter.BOTH)
+tkinter.Button(SCREEN, text="使用自定义跨度", command=set_span, width=gui_width, height=1).pack()  # 切换笔
+tkinter.Button(SCREEN, text="绘制函数", command=open_func_box, width=gui_width, height=gui_height).pack()
+tkinter.Button(SCREEN, text="保存", command=choose_save, width=gui_width, height=1).pack()
+tkinter.Button(SCREEN, text="载入", command=choose_open, width=gui_width, height=1).pack()
+tkinter.Button(SCREEN, text="帮助", command=_help, width=gui_width, height=1).pack()  # help是系统保留关键词,用_help代替
+SCREEN.protocol("WM_DELETE_WINDOW", close)

+ 18 - 19
CGB/TK_DoneHS.py

@@ -1,7 +1,10 @@
+import math
+
 import tkinter
 import tkinter
 import tkinter.messagebox
 import tkinter.messagebox
-import math
 
 
+func = None
+SCREEN = tkinter.Tk()  # 设置屏幕
 help_doc = """
 help_doc = """
 请在第一个输入框输入你的函数方程,不需要输入f(x)=和y=,唯一变量是x(x为自变量)
 请在第一个输入框输入你的函数方程,不需要输入f(x)=和y=,唯一变量是x(x为自变量)
 圆周率-Pi,自然无理数-e
 圆周率-Pi,自然无理数-e
@@ -44,8 +47,8 @@ class FunctionExpression:
 
 
 def custom():
 def custom():
     global func_input, func, help_doc
     global func_input, func, help_doc
-    Input = func_input.get().replace(" ", "")
-    if Input:
+    func_str = func_input.get().replace(" ", "")
+    if func_str:
         if tkinter.messagebox.askokcancel(
         if tkinter.messagebox.askokcancel(
             "提示", f"是否确认生成自定义函数:\n{func_input.get()}\n(点击取消可撤销未执行的制造函数)"
             "提示", f"是否确认生成自定义函数:\n{func_input.get()}\n(点击取消可撤销未执行的制造函数)"
         ):
         ):
@@ -62,21 +65,17 @@ def get_help():
 
 
 
 
 def make_func():
 def make_func():
-    global func_input, func, SCREEN
-    func = None
-    SCREEN = tkinter.Tk()  # 设置屏幕
-    SCREEN.title("")
-    SCREEN.resizable(width=False, height=False)
-    SCREEN.geometry(f"+350+10")
-    button = tkinter.Button(
-        SCREEN, text="制造函数", command=custom, width=28, height=1
-    )  # 收到消息执行这个函数
-    help = tkinter.Button(
-        SCREEN, text="帮助", command=get_help, width=28, height=1
-    )  # 帮助菜单
-    func_input = tkinter.Entry(SCREEN)
-    func_input.pack(fill=tkinter.BOTH)
-    button.pack()
-    help.pack()
+    global SCREEN
     SCREEN.mainloop()
     SCREEN.mainloop()
     return func
     return func
+
+
+SCREEN.title("")
+SCREEN.resizable(width=False, height=False)
+SCREEN.geometry(f"+350+10")
+button = tkinter.Button(SCREEN, text="制造函数", command=custom, width=28, height=1)  # 收到消息执行这个函数
+help = tkinter.Button(SCREEN, text="帮助", command=get_help, width=28, height=1)  # 帮助菜单
+func_input = tkinter.Entry(SCREEN)
+func_input.pack(fill=tkinter.BOTH)
+button.pack()
+help.pack()

+ 36 - 59
CGB/TK_HS.py

@@ -1,7 +1,17 @@
-import tkinter.messagebox
 import math
 import math
+
+import tkinter.messagebox
+
 from CGB import TK_DoneHS
 from CGB import TK_DoneHS
 
 
+custom_function_index = 18  # 字定义函数的序号
+func_dict = {}
+width = 20
+SCREEN = tkinter.Tk()  # 设置屏幕
+SCREEN.title("")
+SCREEN.resizable(width=False, height=False)
+SCREEN.geometry(f"+180+10")
+
 
 
 def linear_func():
 def linear_func():
     global func_dict
     global func_dict
@@ -181,63 +191,30 @@ def close():
 
 
 
 
 def func_box():
 def func_box():
-    global func_dict  # 绘制函数列表
-    global custom_function_index, SCREEN
-    custom_function_index = 18  # 字定义函数的序号
-    func_dict = {}
-    width = 20
-
-    SCREEN = tkinter.Tk()  # 设置屏幕
-    SCREEN.title("")
-    SCREEN.resizable(width=False, height=False)
-    SCREEN.geometry(f"+180+10")
-    tkinter.Button(
-        SCREEN, text="1次函数", command=linear_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="2次函数", command=quadratic_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="-1次函数", command=inverse_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="3次函数", command=cubic_function, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="根号函数", command=radical_func, width=width, height=1
-    ).pack()
-    tkinter.Button(SCREEN, text="对数函数", command=log_func, width=width, height=1).pack()
-    tkinter.Button(SCREEN, text="指数函数", command=exp_func, width=width, height=1).pack()
-    tkinter.Button(
-        SCREEN, text="对数底函数", command=log2_func, width=width, height=1
-    ).pack()
-    tkinter.Button(SCREEN, text="sin函数", command=sin_func, width=width, height=1).pack()
-    tkinter.Button(SCREEN, text="cos函数", command=cos_func, width=width, height=1).pack()
-    tkinter.Button(SCREEN, text="tan函数", command=tan_func, width=width, height=1).pack()
-    tkinter.Button(SCREEN, text="cot函数", command=tan_func, width=width, height=1).pack()
-    tkinter.Button(SCREEN, text="csc函数", command=csc_func, width=width, height=1).pack()
-    tkinter.Button(SCREEN, text="sec函数", command=sec_func, width=width, height=1).pack()
-    tkinter.Button(
-        SCREEN, text="arcsin函数", command=arcsin_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="arccos函数", command=arccos_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="arctan函数", command=arctan_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="arccot函数", command=arccot_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="arccsc函数", command=arccsc_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="arcsec函数", command=arcsec_func, width=width, height=1
-    ).pack()
-    tkinter.Button(
-        SCREEN, text="自定义函数", command=custom_func, width=width, height=3
-    ).pack()
-    SCREEN.protocol("WM_DELETE_WINDOW", close)
+    global SCREEN
     SCREEN.mainloop()
     SCREEN.mainloop()
     return func_dict
     return func_dict
+
+
+tkinter.Button(SCREEN, text="1次函数", command=linear_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="2次函数", command=quadratic_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="-1次函数", command=inverse_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="3次函数", command=cubic_function, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="根号函数", command=radical_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="对数函数", command=log_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="指数函数", command=exp_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="对数底函数", command=log2_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="sin函数", command=sin_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="cos函数", command=cos_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="tan函数", command=tan_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="cot函数", command=tan_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="csc函数", command=csc_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="sec函数", command=sec_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="arcsin函数", command=arcsin_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="arccos函数", command=arccos_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="arctan函数", command=arctan_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="arccot函数", command=arccot_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="arccsc函数", command=arccsc_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="arcsec函数", command=arcsec_func, width=width, height=1).pack()
+tkinter.Button(SCREEN, text="自定义函数", command=custom_func, width=width, height=3).pack()
+SCREEN.protocol("WM_DELETE_WINDOW", close)

+ 17 - 20
CGB/Write.py

@@ -1,8 +1,10 @@
+import time
+import os
+
 import pygame
 import pygame
 from pygame.locals import *
 from pygame.locals import *
+
 from CGB.TK import tool_box
 from CGB.TK import tool_box
-import time
-import os
 
 
 # 定义一些变量
 # 定义一些变量
 pen_color = [0, 0, 0]  # 画笔颜色
 pen_color = [0, 0, 0]  # 画笔颜色
@@ -23,22 +25,25 @@ ordinate_scale = []  # Y个数
 anchor_x = []
 anchor_x = []
 anchor_y = []
 anchor_y = []
 span = 60  # 坐标系跨度调节
 span = 60  # 坐标系跨度调节
-
 middle_key = 0  # 中键模式
 middle_key = 0  # 中键模式
 line = []  # 画线列表
 line = []  # 画线列表
 rect = []  # 画矩阵和圆列表
 rect = []  # 画矩阵和圆列表
 poly = []  # 画多边形列表
 poly = []  # 画多边形列表
-
 tips = ''  # 设置备注
 tips = ''  # 设置备注
-
 save_dir = ''  # 保存路径
 save_dir = ''  # 保存路径
 bottom_tip = [0, 0, 0, 0, 0]  # 底部显示信息[x,y,左键,中间,右键]
 bottom_tip = [0, 0, 0, 0, 0]  # 底部显示信息[x,y,左键,中间,右键]
-
 mode = {1: '绘制坐标系', 2: '绘制直线(g)', 3: '填充矩形(f)', 4: '线条矩形(s)',
 mode = {1: '绘制坐标系', 2: '绘制直线(g)', 3: '填充矩形(f)', 4: '线条矩形(s)',
         5: '绘制横线(k)', 6: '绘制竖线(l)', 7: '绘制多段线(j)',
         5: '绘制横线(k)', 6: '绘制竖线(l)', 7: '绘制多段线(j)',
         8: '绘制横打点多段线(i)', 9: '绘制竖打点多段线(u)', 10: '坐标测绘(h)',
         8: '绘制横打点多段线(i)', 9: '绘制竖打点多段线(u)', 10: '坐标测绘(h)',
         11: '绘制虚线(q)', 12: '填充圆形(c)', 13: '线条圆形(v)', 14: '多边形(n-填充,m-线条)',
         11: '绘制虚线(q)', 12: '填充圆形(c)', 13: '线条圆形(v)', 14: '多边形(n-填充,m-线条)',
         15: '填充椭圆形(e)', 16: '线条椭圆形(r)', 0: 'None'}  # 快捷键名字
         15: '填充椭圆形(e)', 16: '线条椭圆形(r)', 0: 'None'}  # 快捷键名字
+SCREEN_X = 900
+SCREEN_Y = 700
+init_done = pygame.init()  # 初始化所有模块
+FONT = pygame.font.Font(r'Font\ZKST.ttf', 16)  # 设置字体(Linux下应该用\而不是/)
+SCREEN = pygame.display.set_mode((SCREEN_X, SCREEN_Y), 0)  # 创建屏幕
+SCREEN_CAPTION = pygame.display.set_caption('CoTan草稿板')  # 定义标题(后期加上定义Logo)
+SCREEN.fill([255, 255, 255])  # 默认用白色填充窗口
 
 
 
 
 def func_draw(func_list, pixel_accuracy=1000):
 def func_draw(func_list, pixel_accuracy=1000):
@@ -235,21 +240,13 @@ def top_draw():
     SCREEN.blit(model_tip, (0, SCREEN_Y - 16))
     SCREEN.blit(model_tip, (0, SCREEN_Y - 16))
 
 
 
 
-def draw_main(dis_x=900, dis_y=700):
-    global previous_x, previous_y, pen_color, pen_weight, background, coordinate_system_drawing_method
+def draw_main():
+    global previous_x, previous_y, pen_color, pen_weight, coordinate_system_drawing_method
     global coordinate_click_point, record_origin_x
     global coordinate_click_point, record_origin_x
     global record_origin_y, span, line
     global record_origin_y, span, line
     global continuous_draw, middle_key, rect, poly, SCREEN, SCREEN_CAPTION, init_done, previous_x, previous_y, save_dir
     global continuous_draw, middle_key, rect, poly, SCREEN, SCREEN_CAPTION, init_done, previous_x, previous_y, save_dir
-    global increasing_color, subtraction_color, bottom_tip, FONT, SCREEN_X, SCREEN_Y, tips, FONT
-    SCREEN_X = dis_x
-    SCREEN_Y = dis_y
-    init_done = pygame.init()  # 初始化所有模块
-    if init_done[1] != 0:
-        print('Init!')  # 检查是否错误
-    FONT = pygame.font.Font(r'Font\ZKST.ttf', 16)  # 设置字体(Linux下应该用\而不是/)
-    SCREEN = pygame.display.set_mode((dis_x, dis_y), 0)  # 创建屏幕
-    SCREEN_CAPTION = pygame.display.set_caption('CoTan草稿板')  # 定义标题(后期加上定义Logo)
-    SCREEN.fill([255, 255, 255])  # 默认用白色填充窗口
+    global increasing_color, subtraction_color, bottom_tip, FONT, SCREEN_X, SCREEN_Y, tips
+
     flat = True  # 循环条件(不是全局)
     flat = True  # 循环条件(不是全局)
     while flat:
     while flat:
         top_draw()
         top_draw()
@@ -276,12 +273,12 @@ def draw_main(dis_x=900, dis_y=700):
                     bottom_tip[4] = 1
                     bottom_tip[4] = 1
                     pygame.image.save(SCREEN, '$CoTanCC.png')  # 保存当前环境
                     pygame.image.save(SCREEN, '$CoTanCC.png')  # 保存当前环境
                     SCREEN = pygame.display.set_mode(
                     SCREEN = pygame.display.set_mode(
-                        (dis_x, dis_y), pygame.NOFRAME)  # 隐藏关闭按钮
+                        (SCREEN_X, SCREEN_Y), pygame.NOFRAME)  # 隐藏关闭按钮
                     background_image = pygame.image.load('$CoTanCC.png').convert()  # 加载位图
                     background_image = pygame.image.load('$CoTanCC.png').convert()  # 加载位图
                     SCREEN.blit(background_image, (0, 0))  # 绘制位图
                     SCREEN.blit(background_image, (0, 0))  # 绘制位图
                     pygame.display.update()  # 更新屏幕
                     pygame.display.update()  # 更新屏幕
                     tool_set = tool_box()  # 启动工具箱
                     tool_set = tool_box()  # 启动工具箱
-                    SCREEN = pygame.display.set_mode((dis_x, dis_y), 0)  # 显示关闭按钮
+                    SCREEN = pygame.display.set_mode((SCREEN_X, SCREEN_Y), 0)  # 显示关闭按钮
                     background_image = pygame.image.load('$CoTanCC.png').convert()  # 加载位图
                     background_image = pygame.image.load('$CoTanCC.png').convert()  # 加载位图
                     SCREEN.blit(background_image, (0, 0))  # 绘制位图
                     SCREEN.blit(background_image, (0, 0))  # 绘制位图
                     pygame.display.update()  # 更新屏幕
                     pygame.display.update()  # 更新屏幕

+ 1 - 0
CGB/__init__.py

@@ -1,2 +1,3 @@
 from CGB.Write import draw_main
 from CGB.Write import draw_main
+
 print('草稿版加载完毕...')
 print('草稿版加载完毕...')

+ 5 - 4
Crawler/Crawler_controller.py

@@ -1,15 +1,17 @@
-from selenium import webdriver
 import threading
 import threading
 import time
 import time
 import hashlib
 import hashlib
 from time import sleep
 from time import sleep
-import bs4
 import re as regular
 import re as regular
-from Crawler import Information_storage
+
+import bs4
 import requests
 import requests
+from selenium import webdriver
 from selenium.webdriver.common.action_chains import ActionChains
 from selenium.webdriver.common.action_chains import ActionChains
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.common.keys import Keys
 
 
+from Crawler import Information_storage
+
 keys_name_dict = {
 keys_name_dict = {
     "ctrl": Keys.CONTROL,
     "ctrl": Keys.CONTROL,
     "shift": Keys.SHIFT,
     "shift": Keys.SHIFT,
@@ -36,7 +38,6 @@ keys_name_dict = {
 }  # 键-值映射
 }  # 键-值映射
 for i in range(1, 13):  # F1 - F12按键
 for i in range(1, 13):  # F1 - F12按键
     keys_name_dict[f"f{i}"] = eval(f"Keys.F{i}")
     keys_name_dict[f"f{i}"] = eval(f"Keys.F{i}")
-
 data_base = Information_storage.DatabaseController()
 data_base = Information_storage.DatabaseController()
 
 
 
 

File diff suppressed because it is too large
+ 13 - 1772
Crawler/Web_Crawler.py


+ 2 - 1
Crawler/__init__.py

@@ -1,2 +1,3 @@
 from Crawler.Web_Crawler import crawler_main
 from Crawler.Web_Crawler import crawler_main
-print('自动化网页加载完成')
+
+print("自动化网页加载完成")

File diff suppressed because it is too large
+ 319 - 1307
DSGC/Algebra_Systemctl.py


+ 7 - 5
Data_Science/Learn.py

@@ -1,19 +1,21 @@
-from pyecharts.globals import GeoType  # 地图推荐使用GeoType而不是str
+from random import randint
+import re
+from os import getcwd
+
 import numpy as np
 import numpy as np
 from sklearn.feature_extraction import DictVectorizer
 from sklearn.feature_extraction import DictVectorizer
 from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
 from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
 from sklearn.linear_model import *
 from sklearn.linear_model import *
 from sklearn.model_selection import train_test_split
 from sklearn.model_selection import train_test_split
-from random import randint
 from pyecharts.components import Table
 from pyecharts.components import Table
 from pyecharts.globals import SymbolType
 from pyecharts.globals import SymbolType
 from pyecharts.charts import *
 from pyecharts.charts import *
 from pyecharts import options as opts
 from pyecharts import options as opts
-import pandas_profiling as pp
 import pandas as pd
 import pandas as pd
-import re
-from os import getcwd
+import pandas_profiling as pp
+
 from pyecharts.globals import CurrentConfig
 from pyecharts.globals import CurrentConfig
+from pyecharts.globals import GeoType  # 地图推荐使用GeoType而不是str
 
 
 CurrentConfig.ONLINE_HOST = f"{getcwd()}/assets/"
 CurrentConfig.ONLINE_HOST = f"{getcwd()}/assets/"
 
 

File diff suppressed because it is too large
+ 76 - 2170
Data_Science/Me_learn.py


+ 1 - 0
Data_Science/__init__.py

@@ -1,2 +1,3 @@
 from Data_Science.Me_learn import machine_learning
 from Data_Science.Me_learn import machine_learning
+
 print('数据科学模块加载完成...')
 print('数据科学模块加载完成...')

+ 914 - 923
Git_controller/GIT.py

@@ -1,934 +1,18 @@
+import time
+import threading
 import tkinter
 import tkinter
+import os
+
 import tkinter.messagebox
 import tkinter.messagebox
 from tkinter import ttk
 from tkinter import ttk
 from tkinter.filedialog import asksaveasfilename, askdirectory, askopenfilenames
 from tkinter.filedialog import asksaveasfilename, askdirectory, askopenfilenames
-import os
-from Git_controller import GitController
 from tkinter.scrolledtext import ScrolledText
 from tkinter.scrolledtext import ScrolledText
-import time
-import threading
+
+from Git_controller import GitController
 
 
 
 
 def git_main():
 def git_main():
     global SCREEN, git, PATH, bg_color, buttom_color, word_color, repo_list, last_name, file_list, FONT
     global SCREEN, git, PATH, bg_color, buttom_color, word_color, repo_list, last_name, file_list, FONT
-    file_list = []
-    PATH = os.getcwd()
-    git = GitController.GitCtrol()
-    repo_list = []
-    SCREEN = tkinter.Tk()
-    last_name = None
-    bg_color = "#FFFAFA"  # 主颜色
-    buttom_color = "#FFFAFA"  # 按钮颜色
-    word_color = "#000000"  # 文字颜色
-    SCREEN["bg"] = bg_color
-    FONT = ("黑体", 11)  # 设置字体
-    SCREEN.title("CoTan仓库管理器")
-    SCREEN.resizable(width=False, height=False)
-    SCREEN.geometry("+10+10")  # 设置所在位置
-
-    gui_width = 13  # 标准宽度
-    gui_height = 2
-    row = 0
-    column = 0
-
-    global clone_repo, repo_box, repo_dir
-    global commit_message, head, master, no_fast_forward
-    global tag_name, tag_message, tag_commit, show_search_key
-    global remote_ssh, remote_name, remote_branch, local_branch, push_bind, allow_history
-    global branch_name, stash_name, commit, origin_branch
-
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="克隆仓库",
-        command=clone_git,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="打开仓库",
-        command=repo_init,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查看文件",
-        command=update_git_file_select,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="克隆URL:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    clone_repo = tkinter.Entry(SCREEN, width=gui_width * 2)
-    clone_repo.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    repo_box = tkinter.Listbox(SCREEN, width=gui_width * 3, height=gui_height * 4)
-    repo_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=4,
-        sticky=tkinter.E + tkinter.W + tkinter.S + tkinter.N,
-    )
-
-    row += 4
-    tkinter.Label(
-        SCREEN,
-        text="【仓库文件列表】",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width * 3,
-        height=gui_height,
-    ).grid(
-        column=column,
-        columnspan=3,
-        row=row,
-        sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
-    )  # 设置说明
-
-    row += 1
-    repo_dir = tkinter.Listbox(SCREEN, width=gui_width * 3, height=gui_height * 4)
-    repo_dir.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=4,
-        sticky=tkinter.E + tkinter.W + tkinter.S + tkinter.N,
-    )
-
-    row += 4
-    tkinter.Label(
-        SCREEN,
-        text="【添加文件列表】",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width * 3,
-        height=gui_height,
-    ).grid(
-        column=column,
-        columnspan=3,
-        row=row,
-        sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
-    )  # 设置说明
-
-    global file_dir, file_box
-
-    row += 1
-    file_dir = tkinter.Entry(SCREEN, width=gui_width * 2)
-    file_dir.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        sticky=tkinter.E + tkinter.W + tkinter.N + tkinter.S,
-    )
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="填充路径并添加",
-        command=add_file_by_git,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="直接添加",
-        command=add_file_input,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="选择文件",
-        command=add_file_list,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="把文件移除出列表",
-        command=del_file,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="清空列表",
-        command=clean_file,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    file_box = tkinter.Listbox(SCREEN, width=gui_width * 3, height=gui_height * 4)
-    file_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=4,
-        sticky=tkinter.E + tkinter.W + tkinter.S + tkinter.N,
-    )
-
-    row += 4
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="添加暂存区文件",
-        command=add,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="移除暂存区文件",
-        command=remove_the_staging,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="提交到git",
-        command=commit,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查看执行日志",
-        command=lambda: not_parameters_call(git.do_log),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查看文件日志",
-        command=log,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查看状态",
-        command=lambda: not_parameters_call(git.status),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    global log_type, reset_type
-    row += 1
-    log_type = []
-    lable = ["显示轴", "commit完全显示", "简化显示"]  # 复选框
-    for i in range(3):
-        log_type.append(tkinter.IntVar())
-        tkinter.Checkbutton(
-            SCREEN,
-            bg=bg_color,
-            fg=word_color,
-            activebackground=bg_color,
-            activeforeground=word_color,
-            selectcolor=bg_color,
-            text=lable[i],
-            variable=log_type[-1],
-        ).grid(column=column + i, row=row, sticky=tkinter.W)
-        log_type[-1].set(1)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="版本回退",
-        command=reset_head,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="放弃修改",
-        command=checkout_file,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除文件",
-        command=remove_file,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    reset_type = tkinter.IntVar()  # 正,负,0
-    lable = ["回退到工作区", "回退到暂存区", "无痕回退"]  # 复选框
-    for i in range(3):
-        tkinter.Radiobutton(
-            SCREEN,
-            bg=bg_color,
-            fg=word_color,
-            activebackground=bg_color,
-            activeforeground=word_color,
-            selectcolor=bg_color,
-            text=lable[i],
-            variable=reset_type,
-            value=i,
-        ).grid(column=column + i, row=row, sticky=tkinter.W)
-
-    column += 3
-    tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
-        column=column, row=row
-    )  # 设置说明
-    column += 1
-    row = 0
-
-    tkinter.Label(
-        SCREEN,
-        text="【参数操作】",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width * 3,
-        height=gui_height,
-    ).grid(
-        column=column,
-        columnspan=3,
-        row=row,
-        sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
-    )  # 设置说明
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="提交描述:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    commit_message = tkinter.Entry(SCREEN, width=gui_width * 2)
-    commit_message.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="diff分支:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    master = tkinter.Entry(SCREEN, width=gui_width * 2)
-    master.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="回退版本号:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    head = tkinter.Entry(SCREEN, width=gui_width * 2)
-    head.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="本地分支:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    branch_name = tkinter.Entry(SCREEN, width=gui_width * 2)
-    branch_name.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="远程分支:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    origin_branch = tkinter.Entry(SCREEN, width=gui_width * 2)
-    origin_branch.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="远程仓库链接:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    remote_ssh = tkinter.Entry(SCREEN, width=gui_width)
-    remote_ssh.grid(column=column + 1, columnspan=2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="远程仓库名:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    remote_name = tkinter.Entry(SCREEN, width=gui_width)
-    remote_name.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="commit:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    commit = tkinter.Entry(SCREEN, width=gui_width)
-    commit.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="标签名字:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    tag_name = tkinter.Entry(SCREEN, width=gui_width)
-    tag_name.grid(column=column + 1, columnspan=2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="查询关键字:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    show_search_key = tkinter.Entry(SCREEN, width=gui_width)
-    show_search_key.grid(
-        column=column + 1, columnspan=2, row=row, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="工作区序号:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row)
-    stash_name = tkinter.Entry(SCREEN, width=gui_width)
-    stash_name.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="【高级操作】",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width * 3,
-        height=gui_height,
-    ).grid(
-        column=column,
-        columnspan=3,
-        row=row,
-        sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
-    )  # 设置说明
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查看分支",
-        command=lambda: not_parameters_call(git.branch_view),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="新建分支",
-        command=add_new_branch,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="切换分支",
-        command=switch_branch,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除分支",
-        command=lambda: del_branch(1),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="丢弃分支",
-        command=lambda: del_branch(0),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="合并分支",
-        command=switch_branch,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    no_fast_forward = tkinter.IntVar()
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="合并分支",
-        command=branch_merge,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="退出冲突处理",
-        command=lambda: not_parameters_call(git.merge_abort),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="使用快速合并",
-        variable=no_fast_forward,
-    ).grid(column=column + 1, row=row, sticky=tkinter.W)
-    no_fast_forward.set(0)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="连接远程仓库",
-        command=add_remote,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="推送到远程仓库",
-        command=lambda: pull_push_remote(1),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="从远程仓库抓取",
-        command=lambda: pull_push_remote(0),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    push_bind = tkinter.IntVar()
-    allow_history = tkinter.IntVar()
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="分支绑定",
-        command=bind_remote_branch,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="无视历史记录",
-        variable=allow_history,
-    ).grid(column=column + 1, row=row, sticky=tkinter.W)
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="推送时绑定",
-        variable=push_bind,
-    ).grid(column=column + 2, row=row, sticky=tkinter.W)
-    allow_history.set(0)
-    push_bind.set(0)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="应用标签",
-        command=add_tag,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查看已有标签",
-        command=lambda: show_tag(1),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="查询commit记录",
-        command=lambda: show_tag(0),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="推送标签",
-        command=push_tag,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="推送所有标签",
-        command=push_all_tag,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除本地标签",
-        command=del_tag,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除远程标签",
-        command=del_remote_tag,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除远程分支",
-        command=del_remote_branch,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="刷新远程分支",
-        command=fetch_remote,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="commit补丁",
-        command=cherry_pick,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除远程仓库",
-        command=del_remote,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="工作区列表",
-        command=lambda: not_parameters_call(git.stash_list),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    global branch_new_name
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="文件回退",
-        command=reset_file,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="分支重命名",
-        command=branch_new,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    branch_new_name = tkinter.Entry(SCREEN, width=gui_width)
-    branch_new_name.grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="保存工作区",
-        command=lambda: not_parameters_call(git.save_stash),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="恢复工作区",
-        command=lambda: open_stash(1),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="删除工作区",
-        command=lambda: open_stash(0),
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    global customize_input, threaded_refresh, asynchronous_display
-    row += 1
-    threaded_refresh = tkinter.IntVar()
-    asynchronous_display = tkinter.IntVar()
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="多进程刷新",
-        variable=threaded_refresh,
-    ).grid(column=0, row=row, sticky=tkinter.W)
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="异步显示",
-        variable=asynchronous_display,
-    ).grid(column=1, row=row, sticky=tkinter.W)
-    customize_input = tkinter.Entry(SCREEN, width=gui_width * 3)
-    customize_input.grid(
-        column=2,
-        row=row,
-        columnspan=4,
-        sticky=tkinter.E + tkinter.W + tkinter.N + tkinter.S,
-    )
-
-    tkinter.Button(
-        SCREEN,
-        bg=buttom_color,
-        fg=word_color,
-        text="执行操作",
-        command=customize,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-    threaded_refresh.set(0)
-    asynchronous_display.set(1)
-    tag_message = commit_message
-    tag_commit = commit
-    remote_branch = origin_branch
-    local_branch = branch_name
-
     SCREEN.mainloop()
     SCREEN.mainloop()
 
 
 
 
@@ -1441,7 +525,7 @@ def not_parameters_call(func):
     update_git_file_last()
     update_git_file_last()
 
 
 
 
-def commit():
+def commit_file():
     global git, commit_message
     global git, commit_message
     m = commit_message.get()
     m = commit_message.get()
     if m.replace(" ", "") == "":
     if m.replace(" ", "") == "":
@@ -1677,3 +761,910 @@ def progress_bar(*args, name="CoTan_Git >>> 运行中...", **kwargs):
         SCREEN.update()
         SCREEN.update()
         time.sleep(0.001)
         time.sleep(0.001)
     progress_screen.destroy()
     progress_screen.destroy()
+
+file_list = []
+PATH = os.getcwd()
+git = GitController.GitCtrol()
+repo_list = []
+SCREEN = tkinter.Tk()
+last_name = None
+bg_color = "#FFFAFA"  # 主颜色
+buttom_color = "#FFFAFA"  # 按钮颜色
+word_color = "#000000"  # 文字颜色
+SCREEN["bg"] = bg_color
+FONT = ("黑体", 11)  # 设置字体
+SCREEN.title("CoTan仓库管理器")
+SCREEN.resizable(width=False, height=False)
+SCREEN.geometry("+10+10")  # 设置所在位置
+
+gui_width = 13  # 标准宽度
+gui_height = 2
+row = 0
+column = 0
+
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="克隆仓库",
+    command=clone_git,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="打开仓库",
+    command=repo_init,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查看文件",
+    command=update_git_file_select,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="克隆URL:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+clone_repo = tkinter.Entry(SCREEN, width=gui_width * 2)
+clone_repo.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+repo_box = tkinter.Listbox(SCREEN, width=gui_width * 3, height=gui_height * 4)
+repo_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=4,
+    sticky=tkinter.E + tkinter.W + tkinter.S + tkinter.N,
+)
+
+row += 4
+tkinter.Label(
+    SCREEN,
+    text="【仓库文件列表】",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width * 3,
+    height=gui_height,
+).grid(
+    column=column,
+    columnspan=3,
+    row=row,
+    sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
+)  # 设置说明
+
+row += 1
+repo_dir = tkinter.Listbox(SCREEN, width=gui_width * 3, height=gui_height * 4)
+repo_dir.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=4,
+    sticky=tkinter.E + tkinter.W + tkinter.S + tkinter.N,
+)
+
+row += 4
+tkinter.Label(
+    SCREEN,
+    text="【添加文件列表】",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width * 3,
+    height=gui_height,
+).grid(
+    column=column,
+    columnspan=3,
+    row=row,
+    sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
+)  # 设置说明
+
+row += 1
+file_dir = tkinter.Entry(SCREEN, width=gui_width * 2)
+file_dir.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    sticky=tkinter.E + tkinter.W + tkinter.N + tkinter.S,
+)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="填充路径并添加",
+    command=add_file_by_git,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="直接添加",
+    command=add_file_input,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="选择文件",
+    command=add_file_list,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="把文件移除出列表",
+    command=del_file,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="清空列表",
+    command=clean_file,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+file_box = tkinter.Listbox(SCREEN, width=gui_width * 3, height=gui_height * 4)
+file_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=4,
+    sticky=tkinter.E + tkinter.W + tkinter.S + tkinter.N,
+)
+
+row += 4
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="添加暂存区文件",
+    command=add,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="移除暂存区文件",
+    command=remove_the_staging,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="提交到git",
+    command=commit_file,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查看执行日志",
+    command=lambda: not_parameters_call(git.do_log),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查看文件日志",
+    command=log,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查看状态",
+    command=lambda: not_parameters_call(git.status),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+log_type = []
+lable = ["显示轴", "commit完全显示", "简化显示"]  # 复选框
+for i in range(3):
+    log_type.append(tkinter.IntVar())
+    tkinter.Checkbutton(
+        SCREEN,
+        bg=bg_color,
+        fg=word_color,
+        activebackground=bg_color,
+        activeforeground=word_color,
+        selectcolor=bg_color,
+        text=lable[i],
+        variable=log_type[-1],
+    ).grid(column=column + i, row=row, sticky=tkinter.W)
+    log_type[-1].set(1)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="版本回退",
+    command=reset_head,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="放弃修改",
+    command=checkout_file,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除文件",
+    command=remove_file,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+reset_type = tkinter.IntVar()  # 正,负,0
+lable = ["回退到工作区", "回退到暂存区", "无痕回退"]  # 复选框
+for i in range(3):
+    tkinter.Radiobutton(
+        SCREEN,
+        bg=bg_color,
+        fg=word_color,
+        activebackground=bg_color,
+        activeforeground=word_color,
+        selectcolor=bg_color,
+        text=lable[i],
+        variable=reset_type,
+        value=i,
+    ).grid(column=column + i, row=row, sticky=tkinter.W)
+
+column += 3
+tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
+    column=column, row=row
+)  # 设置说明
+column += 1
+row = 0
+
+tkinter.Label(
+    SCREEN,
+    text="【参数操作】",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width * 3,
+    height=gui_height,
+).grid(
+    column=column,
+    columnspan=3,
+    row=row,
+    sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
+)  # 设置说明
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="提交描述:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+commit_message = tkinter.Entry(SCREEN, width=gui_width * 2)
+commit_message.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="diff分支:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+master = tkinter.Entry(SCREEN, width=gui_width * 2)
+master.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="回退版本号:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+head = tkinter.Entry(SCREEN, width=gui_width * 2)
+head.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="本地分支:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+branch_name = tkinter.Entry(SCREEN, width=gui_width * 2)
+branch_name.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="远程分支:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+origin_branch = tkinter.Entry(SCREEN, width=gui_width * 2)
+origin_branch.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="远程仓库链接:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+remote_ssh = tkinter.Entry(SCREEN, width=gui_width)
+remote_ssh.grid(column=column + 1, columnspan=2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="远程仓库名:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+remote_name = tkinter.Entry(SCREEN, width=gui_width)
+remote_name.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="commit:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+commit = tkinter.Entry(SCREEN, width=gui_width)
+commit.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="标签名字:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+tag_name = tkinter.Entry(SCREEN, width=gui_width)
+tag_name.grid(column=column + 1, columnspan=2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="查询关键字:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+show_search_key = tkinter.Entry(SCREEN, width=gui_width)
+show_search_key.grid(
+    column=column + 1, columnspan=2, row=row, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="工作区序号:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row)
+stash_name = tkinter.Entry(SCREEN, width=gui_width)
+stash_name.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="【高级操作】",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width * 3,
+    height=gui_height,
+).grid(
+    column=column,
+    columnspan=3,
+    row=row,
+    sticky=tkinter.E + tkinter.W + tkinter.W + tkinter.S + tkinter.N,
+)  # 设置说明
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查看分支",
+    command=lambda: not_parameters_call(git.branch_view),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="新建分支",
+    command=add_new_branch,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="切换分支",
+    command=switch_branch,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除分支",
+    command=lambda: del_branch(1),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="丢弃分支",
+    command=lambda: del_branch(0),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="合并分支",
+    command=switch_branch,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+no_fast_forward = tkinter.IntVar()
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="合并分支",
+    command=branch_merge,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="退出冲突处理",
+    command=lambda: not_parameters_call(git.merge_abort),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="使用快速合并",
+    variable=no_fast_forward,
+).grid(column=column + 1, row=row, sticky=tkinter.W)
+no_fast_forward.set(0)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="连接远程仓库",
+    command=add_remote,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="推送到远程仓库",
+    command=lambda: pull_push_remote(1),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="从远程仓库抓取",
+    command=lambda: pull_push_remote(0),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+push_bind = tkinter.IntVar()
+allow_history = tkinter.IntVar()
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="分支绑定",
+    command=bind_remote_branch,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="无视历史记录",
+    variable=allow_history,
+).grid(column=column + 1, row=row, sticky=tkinter.W)
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="推送时绑定",
+    variable=push_bind,
+).grid(column=column + 2, row=row, sticky=tkinter.W)
+allow_history.set(0)
+push_bind.set(0)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="应用标签",
+    command=add_tag,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查看已有标签",
+    command=lambda: show_tag(1),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="查询commit记录",
+    command=lambda: show_tag(0),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="推送标签",
+    command=push_tag,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="推送所有标签",
+    command=push_all_tag,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除本地标签",
+    command=del_tag,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除远程标签",
+    command=del_remote_tag,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除远程分支",
+    command=del_remote_branch,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="刷新远程分支",
+    command=fetch_remote,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="commit补丁",
+    command=cherry_pick,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除远程仓库",
+    command=del_remote,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="工作区列表",
+    command=lambda: not_parameters_call(git.stash_list),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="文件回退",
+    command=reset_file,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="分支重命名",
+    command=branch_new,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+branch_new_name = tkinter.Entry(SCREEN, width=gui_width)
+branch_new_name.grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="保存工作区",
+    command=lambda: not_parameters_call(git.save_stash),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="恢复工作区",
+    command=lambda: open_stash(1),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="删除工作区",
+    command=lambda: open_stash(0),
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+threaded_refresh = tkinter.IntVar()
+asynchronous_display = tkinter.IntVar()
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="多进程刷新",
+    variable=threaded_refresh,
+).grid(column=0, row=row, sticky=tkinter.W)
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="异步显示",
+    variable=asynchronous_display,
+).grid(column=1, row=row, sticky=tkinter.W)
+customize_input = tkinter.Entry(SCREEN, width=gui_width * 3)
+customize_input.grid(
+    column=2,
+    row=row,
+    columnspan=4,
+    sticky=tkinter.E + tkinter.W + tkinter.N + tkinter.S,
+)
+
+tkinter.Button(
+    SCREEN,
+    bg=buttom_color,
+    fg=word_color,
+    text="执行操作",
+    command=customize,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+threaded_refresh.set(0)
+asynchronous_display.set(1)
+tag_message = commit_message
+tag_commit = commit
+remote_branch = origin_branch
+local_branch = branch_name

+ 1 - 0
Git_controller/__init__.py

@@ -1,2 +1,3 @@
 from Git_controller.GIT import git_main
 from Git_controller.GIT import git_main
+
 print('Git控制器加载完毕')
 print('Git控制器加载完毕')

+ 365 - 362
HSCH/Func_Matlib.py

@@ -1,16 +1,53 @@
-import numpy
-import pandas
-from matplotlib import pyplot as plt
-from matplotlib import rcParams
-import tkinter
-import tkinter.messagebox
+from os import path
 import math
 import math
 import random
 import random
+import tkinter
+import tkinter.messagebox
 from tkinter.filedialog import asksaveasfile
 from tkinter.filedialog import asksaveasfile
 import tkinter.messagebox
 import tkinter.messagebox
-from os import path
+
+import numpy
+import pandas
+from matplotlib import pyplot as plt
+from matplotlib import rcParams
+
 from HSCH.HS import ExpFunc, SheetFunc
 from HSCH.HS import ExpFunc, SheetFunc
 
 
+func_list = []
+fig = None
+func_str_list = []
+prompt_num = 0
+FONT = (r"Font\ZKST.ttf", 11)  # 设置字体
+SCREEN = tkinter.Tk()  # 设置屏幕
+
+line_style = {
+    "实线": "-",
+    "短横线": "--",
+    "点划线": "-,",
+    "虚线": ":",
+    "点标记": ".",
+    "圆标记": "o",
+    "倒三角": "v",
+    "正三角": "^",
+    "左三角": "&lt",
+    "下箭头": "1",
+    "上箭头": "2",
+    "左箭头": "3",
+    "右箭头": "4",
+    "正方形": "s",
+    "五边形": "p",
+    "星形": "*",
+    "六边形": "h",
+    "六边形2": "H",
+    "+号": "+",
+    "X标记": "x",
+}  # 函数样式翻译表
+point_style = ["g", "r", "c", "m", "y", "k"]
+csv_list = []
+
+gui_width = 12  # 标准宽度
+gui_height = 1
+
 
 
 def type_selection(iter_object, si=float, n=True):  # Float筛选系统
 def type_selection(iter_object, si=float, n=True):  # Float筛选系统
     x = []
     x = []
@@ -293,7 +330,7 @@ def add_func():  # 添加函数
 
 
 
 
 def clean_func_box():  # 添加函数
 def clean_func_box():  # 添加函数
-    global func_list, func_str_list, func_exp_box, x_I, func_name, line_style, point_style, func_style
+    global func_list, func_str_list, func_exp_box, func_name, line_style, point_style, func_style
     if tkinter.messagebox.askokcancel("提示", "是否清空所有函数?)"):
     if tkinter.messagebox.askokcancel("提示", "是否清空所有函数?)"):
         func_str_list = []
         func_str_list = []
         func_list = []
         func_list = []
@@ -454,7 +491,7 @@ def output_prompt(news):
 
 
 
 
 def func_differentiation():
 def func_differentiation():
-    global func_list, func_exp_box, property_box, func_str_list, x_I, func_name, line_style, point_style, func_style
+    global func_list, func_exp_box, property_box, func_str_list, func_name, line_style, point_style, func_style
     try:
     try:
         fucn = func_list[func_exp_box.curselection()[0]]
         fucn = func_list[func_exp_box.curselection()[0]]
         diff = fucn.derivatives
         diff = fucn.derivatives
@@ -486,357 +523,323 @@ def function_mapping():
     global x_axis, y_axis, x_limit, y_limit
     global x_axis, y_axis, x_limit, y_limit
     global func_exp_box, sheet_box, x_value, result_box, func_list, func_str_list, y_value, dicon_parameters
     global func_exp_box, sheet_box, x_value, result_box, func_list, func_str_list, y_value, dicon_parameters
     global y_value_gradient, property_box, prompt_box, prompt_num
     global y_value_gradient, property_box, prompt_box, prompt_num
-    func_list = []
-    func_str_list = []
-    prompt_num = 0
-
-    # 控制面板使用Tk实现
-    SCREEN = tkinter.Tk()  # 设置屏幕
-    SCREEN.title("CoTan函数测绘")
-    SCREEN.resizable(width=False, height=False)
-    SCREEN.geometry(f"+10+10")
-    FONT = (r"Font\ZKST.ttf", 11)  # 设置字体
-    rcParams["font.family"] = "simhei"
-    rcParams["axes.unicode_minus"] = False
-
-    line_style = {
-        "实线": "-",
-        "短横线": "--",
-        "点划线": "-,",
-        "虚线": ":",
-        "点标记": ".",
-        "圆标记": "o",
-        "倒三角": "v",
-        "正三角": "^",
-        "左三角": "&lt",
-        "下箭头": "1",
-        "上箭头": "2",
-        "左箭头": "3",
-        "右箭头": "4",
-        "正方形": "s",
-        "五边形": "p",
-        "星形": "*",
-        "六边形": "h",
-        "六边形2": "H",
-        "+号": "+",
-        "X标记": "x",
-    }  # 函数样式翻译表
-    point_style = ["g", "r", "c", "m", "y", "k"]
-    csv_list = []
-
-    gui_width = 12  # 标准宽度
-    gui_height = 1
-    # column-水平方向,row-竖直方向
-    # 设置解析式
-    tkinter.Label(
-        SCREEN, text="输入解析式:", font=FONT, width=gui_width, height=gui_height
-    ).grid(
-        column=0, row=0
-    )  # 设置说明
-    func_exp = tkinter.Entry(SCREEN, width=gui_width * 2)
-    func_exp.grid(column=1, row=0, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    # 设置定义域
-    tkinter.Label(
-        SCREEN, font=FONT, text="定义域:", width=gui_width, height=gui_height
-    ).grid(
-        column=0, row=1
-    )  # 设置说明
-    definition_domain = tkinter.Entry(SCREEN, width=gui_width * 2)
-    definition_domain.grid(column=1, row=1, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    # 设置函数名字
-    tkinter.Label(
-        SCREEN, font=FONT, text="函数名字:", width=gui_width, height=gui_height
-    ).grid(
-        column=0, row=2
-    )  # 设置说明
-    func_name = tkinter.Entry(SCREEN, width=gui_width * 2)
-    func_name.grid(column=1, row=2, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    # 设置函数图示
-    tkinter.Label(
-        SCREEN, font=FONT, text="函数样式:", width=gui_width, height=gui_height
-    ).grid(
-        column=0, row=3
-    )  # 设置说明
-    func_style = tkinter.Entry(SCREEN, width=gui_width * 2)
-    func_style.grid(column=1, row=3, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y = 4  # 按钮统一纵坐标
-    tkinter.Button(
-        SCREEN,
-        text="添加新函数",
-        command=add_func,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=0, row=a_y
-    )  # 添加函数
-    tkinter.Button(
-        SCREEN,
-        text="删除选中函数",
-        command=del_func,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=1, row=a_y
-    )  # 删除函数
-    tkinter.Button(
-        SCREEN,
-        text="清除函数",
-        command=clean_func_box,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=2, row=a_y
-    )  # 绘制函数
-    a_y += 1
-    # 显示函数
-    func_exp_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2)  # 暂时不启用多选
-    rowspan = 10
-    func_exp_box.grid(
-        column=0,
-        row=a_y,
-        columnspan=3,
-        rowspan=rowspan,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-    a_y += rowspan
-    tkinter.Label(SCREEN, font=FONT, text="", width=gui_width, height=1).grid(
-        column=0, row=a_y
-    )
-
-    tkinter.Label(SCREEN, font=FONT, text="", width=1).grid(column=4, row=0)  # 占用第四
-    a_y = 0
-    # 输入x函数求y值
-    tkinter.Label(
-        SCREEN, font=FONT, text="计算(y):", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    x_value = tkinter.Entry(SCREEN, width=gui_width * 2)
-    x_value.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    # 输入x函数求y值
-    tkinter.Label(
-        SCREEN, font=FONT, text="二分法计算(y):", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    y_value = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_value.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    tkinter.Label(
-        SCREEN, font=FONT, text="二分法参数:", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    dicon_parameters = tkinter.Entry(SCREEN, width=gui_width * 2)
-    dicon_parameters.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    # 输入x函数求y值
-    tkinter.Label(
-        SCREEN, font=FONT, text="梯度法计算(y):", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    y_value_gradient = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_value_gradient.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    tkinter.Button(
-        SCREEN,
-        text="计算(y)",
-        command=calculate,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    tkinter.Button(
-        SCREEN,
-        text="二分法计算(x)",
-        command=dichotomy,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=6, row=a_y)
-    tkinter.Button(
-        SCREEN,
-        text="梯度法计算(x)",
-        command=gradient_method_calculation,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=7, row=a_y)
-
-    a_y += 1
-    # 绘制函数坐标表格
-    tkinter.Button(
-        SCREEN,
-        text="查看记忆",
-        command=show_memory,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=5, row=a_y)
-    tkinter.Button(
-        SCREEN,
-        text="隐藏记忆",
-        command=hide_memory,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=6, row=a_y)
-    tkinter.Button(
-        SCREEN,
-        text="清空记忆",
-        command=clean_func_memory,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=7, row=a_y)
-
-    a_y += 1
-    # 显示函数
-    result_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2, height=17)  # 暂时不启用多选
-    result_box.grid(
-        column=5, row=a_y, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
-    )
-
-    a_y += 1
-    # 设置坐标系刻度
-    tkinter.Label(
-        SCREEN, font=FONT, text="X轴(函数):", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y, sticky=tkinter.N
-    )  # 设置说明
-    x_axis = tkinter.Entry(SCREEN, width=gui_width * 2)
-    x_axis.grid(
-        column=6, row=a_y, columnspan=2, sticky=tkinter.N + tkinter.E + tkinter.W
-    )
-
-    a_y += 1
-    # 设置坐标系刻度
-    tkinter.Label(
-        SCREEN, font=FONT, text="Y轴(函数):", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    y_axis = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_axis.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    # 设置坐标系刻度
-    tkinter.Label(
-        SCREEN, font=FONT, text="X轴极限:", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    x_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
-    x_limit.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    # 设置坐标系刻度
-    tkinter.Label(
-        SCREEN, font=FONT, text="Y轴极限:", width=gui_width, height=gui_height
-    ).grid(
-        column=5, row=a_y
-    )  # 设置说明
-    y_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_limit.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    a_y += 1
-    tkinter.Button(
-        SCREEN,
-        text="绘制函数",
-        command=plot_func,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=5, row=a_y
-    )  # 绘制函数
-    tkinter.Button(
-        SCREEN,
-        text="计算性质",
-        command=property_prediction,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=6, row=a_y
-    )  # 绘制函数
-    tkinter.Button(
-        SCREEN,
-        text="创建导函数",
-        command=func_differentiation,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=7, row=a_y
-    )  # 绘制函数
-    a_y += 1
-    property_box = tkinter.Listbox(
-        SCREEN, width=gui_width * 3 + 2, height=10
-    )  # 暂时不启用多选
-    property_box.grid(
-        column=5, row=a_y, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
-    )
-    a_y += 1
-    prompt_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2, height=5)  # 暂时不启用多选
-    prompt_box.grid(
-        column=5, row=a_y, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
-    )
-
-    tkinter.Label(SCREEN, font=FONT, text="", width=1).grid(column=8, row=a_y)  # 占用第四
-    a_y = 0
-
-    # 绘制函数坐标表格
-    tkinter.Button(
-        SCREEN,
-        text="导入表格",
-        command=add_from_csv,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=9, row=a_y)
-    tkinter.Button(
-        SCREEN,
-        text="生成表格",
-        command=func_to_sheet,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=10, row=a_y)
-    tkinter.Button(
-        SCREEN,
-        text="导出表格",
-        command=func_to_csv,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=11, row=a_y)
-
-    a_y += 1
-    # 显示函数的xy
-    sheet_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2)  # 暂时不启用多选
-    sheet_box.grid(
-        column=9,
-        row=a_y,
-        columnspan=3,
-        rowspan=rowspan + 4,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-
-    output_prompt("加载完成,欢迎使用!")
+
     SCREEN.mainloop()
     SCREEN.mainloop()
+
+
+SCREEN.title("CoTan函数测绘")
+SCREEN.resizable(width=False, height=False)
+SCREEN.geometry(f"+10+10")
+rcParams["font.family"] = "simhei"
+rcParams["axes.unicode_minus"] = False
+tkinter.Label(
+    SCREEN, text="输入解析式:", font=FONT, width=gui_width, height=gui_height
+).grid(
+    column=0, row=0
+)  # 设置说明
+func_exp = tkinter.Entry(SCREEN, width=gui_width * 2)
+func_exp.grid(column=1, row=0, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+# 设置定义域
+tkinter.Label(
+    SCREEN, font=FONT, text="定义域:", width=gui_width, height=gui_height
+).grid(
+    column=0, row=1
+)  # 设置说明
+definition_domain = tkinter.Entry(SCREEN, width=gui_width * 2)
+definition_domain.grid(column=1, row=1, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+# 设置函数名字
+tkinter.Label(
+    SCREEN, font=FONT, text="函数名字:", width=gui_width, height=gui_height
+).grid(
+    column=0, row=2
+)  # 设置说明
+func_name = tkinter.Entry(SCREEN, width=gui_width * 2)
+func_name.grid(column=1, row=2, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+# 设置函数图示
+tkinter.Label(
+    SCREEN, font=FONT, text="函数样式:", width=gui_width, height=gui_height
+).grid(
+    column=0, row=3
+)  # 设置说明
+func_style = tkinter.Entry(SCREEN, width=gui_width * 2)
+func_style.grid(column=1, row=3, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y = 4  # 按钮统一纵坐标
+tkinter.Button(
+    SCREEN,
+    text="添加新函数",
+    command=add_func,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=0, row=a_y
+)  # 添加函数
+tkinter.Button(
+    SCREEN,
+    text="删除选中函数",
+    command=del_func,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=1, row=a_y
+)  # 删除函数
+tkinter.Button(
+    SCREEN,
+    text="清除函数",
+    command=clean_func_box,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=2, row=a_y
+)  # 绘制函数
+a_y += 1
+# 显示函数
+func_exp_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2)  # 暂时不启用多选
+rowspan = 10
+func_exp_box.grid(
+    column=0,
+    row=a_y,
+    columnspan=3,
+    rowspan=rowspan,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+a_y += rowspan
+tkinter.Label(SCREEN, font=FONT, text="", width=gui_width, height=1).grid(
+    column=0, row=a_y
+)
+
+tkinter.Label(SCREEN, font=FONT, text="", width=1).grid(column=4, row=0)  # 占用第四
+a_y = 0
+# 输入x函数求y值
+tkinter.Label(
+    SCREEN, font=FONT, text="计算(y):", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+x_value = tkinter.Entry(SCREEN, width=gui_width * 2)
+x_value.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+# 输入x函数求y值
+tkinter.Label(
+    SCREEN, font=FONT, text="二分法计算(y):", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+y_value = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_value.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+tkinter.Label(
+    SCREEN, font=FONT, text="二分法参数:", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+dicon_parameters = tkinter.Entry(SCREEN, width=gui_width * 2)
+dicon_parameters.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+# 输入x函数求y值
+tkinter.Label(
+    SCREEN, font=FONT, text="梯度法计算(y):", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+y_value_gradient = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_value_gradient.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+tkinter.Button(
+    SCREEN,
+    text="计算(y)",
+    command=calculate,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+tkinter.Button(
+    SCREEN,
+    text="二分法计算(x)",
+    command=dichotomy,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=6, row=a_y)
+tkinter.Button(
+    SCREEN,
+    text="梯度法计算(x)",
+    command=gradient_method_calculation,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=7, row=a_y)
+
+a_y += 1
+# 绘制函数坐标表格
+tkinter.Button(
+    SCREEN,
+    text="查看记忆",
+    command=show_memory,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=5, row=a_y)
+tkinter.Button(
+    SCREEN,
+    text="隐藏记忆",
+    command=hide_memory,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=6, row=a_y)
+tkinter.Button(
+    SCREEN,
+    text="清空记忆",
+    command=clean_func_memory,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=7, row=a_y)
+
+a_y += 1
+# 显示函数
+result_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2, height=17)  # 暂时不启用多选
+result_box.grid(
+    column=5, row=a_y, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
+)
+
+a_y += 1
+# 设置坐标系刻度
+tkinter.Label(
+    SCREEN, font=FONT, text="X轴(函数):", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y, sticky=tkinter.N
+)  # 设置说明
+x_axis = tkinter.Entry(SCREEN, width=gui_width * 2)
+x_axis.grid(
+    column=6, row=a_y, columnspan=2, sticky=tkinter.N + tkinter.E + tkinter.W
+)
+
+a_y += 1
+# 设置坐标系刻度
+tkinter.Label(
+    SCREEN, font=FONT, text="Y轴(函数):", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+y_axis = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_axis.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+# 设置坐标系刻度
+tkinter.Label(
+    SCREEN, font=FONT, text="X轴极限:", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+x_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
+x_limit.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+# 设置坐标系刻度
+tkinter.Label(
+    SCREEN, font=FONT, text="Y轴极限:", width=gui_width, height=gui_height
+).grid(
+    column=5, row=a_y
+)  # 设置说明
+y_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_limit.grid(column=6, row=a_y, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+a_y += 1
+tkinter.Button(
+    SCREEN,
+    text="绘制函数",
+    command=plot_func,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=5, row=a_y
+)  # 绘制函数
+tkinter.Button(
+    SCREEN,
+    text="计算性质",
+    command=property_prediction,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=6, row=a_y
+)  # 绘制函数
+tkinter.Button(
+    SCREEN,
+    text="创建导函数",
+    command=func_differentiation,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=7, row=a_y
+)  # 绘制函数
+a_y += 1
+property_box = tkinter.Listbox(
+    SCREEN, width=gui_width * 3 + 2, height=10
+)  # 暂时不启用多选
+property_box.grid(
+    column=5, row=a_y, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
+)
+a_y += 1
+prompt_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2, height=5)  # 暂时不启用多选
+prompt_box.grid(
+    column=5, row=a_y, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
+)
+
+tkinter.Label(SCREEN, font=FONT, text="", width=1).grid(column=8, row=a_y)  # 占用第四
+a_y = 0
+
+# 绘制函数坐标表格
+tkinter.Button(
+    SCREEN,
+    text="导入表格",
+    command=add_from_csv,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=9, row=a_y)
+tkinter.Button(
+    SCREEN,
+    text="生成表格",
+    command=func_to_sheet,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=10, row=a_y)
+tkinter.Button(
+    SCREEN,
+    text="导出表格",
+    command=func_to_csv,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=11, row=a_y)
+
+a_y += 1
+# 显示函数的xy
+sheet_box = tkinter.Listbox(SCREEN, width=gui_width * 3 + 2)  # 暂时不启用多选
+sheet_box.grid(
+    column=9,
+    row=a_y,
+    columnspan=3,
+    rowspan=rowspan + 4,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+
+output_prompt("加载完成,欢迎使用!")

+ 935 - 948
HSCH/Func_advanced.py

@@ -1,14 +1,50 @@
 from __future__ import division  # 让/恢复为除法
 from __future__ import division  # 让/恢复为除法
+import random
+import tkinter
+import tkinter.messagebox
+
 import sympy
 import sympy
 from matplotlib import pyplot as plt
 from matplotlib import pyplot as plt
 from matplotlib import rcParams
 from matplotlib import rcParams
-import tkinter
-import tkinter.messagebox
-import random
-from New_TK import DragWindow
 from matplotlib.animation import FuncAnimation
 from matplotlib.animation import FuncAnimation
+
 from HSCH.HS import ExpFunc as ExpFunc
 from HSCH.HS import ExpFunc as ExpFunc
 
 
+func = None
+fig = None
+prompt_num = 0
+line_style = {
+    "实线": "-",
+    "短横线": "--",
+    "点划线": "-,",
+    "虚线": ":",
+    "点标记": ".",
+    "圆标记": "o",
+    "倒三角": "v",
+    "正三角": "^",
+    "左三角": "&lt",
+    "下箭头": "1",
+    "上箭头": "2",
+    "左箭头": "3",
+    "右箭头": "4",
+    "正方形": "s",
+    "五边形": "p",
+    "星形": "*",
+    "六边形": "h",
+    "六边形2": "H",
+    "+号": "+",
+    "X标记": "x",
+}  # 函数样式翻译表
+point_style = ["g", "r", "c", "m", "y", "k"]
+SCREEN = tkinter.Tk()
+bg_color = "#FFFAFA"  # 主颜色
+botton_color = "#FFFAFA"  # 按钮颜色
+word_color = "#000000"  # 文字颜色
+gui_width = 13  # 标准宽度
+gui_height = 2
+row = 0
+column = 1
+
 
 
 def type_selection(sequence, type_=float, convert=True):  # Float筛选系统
 def type_selection(sequence, type_=float, convert=True):  # Float筛选系统
     x = []
     x = []
@@ -288,7 +324,7 @@ def dichotomy():  # 二分法
 
 
 
 
 def property_prediction():
 def property_prediction():
-    global func, lb, prediction_box, prediction_accuracy
+    global func, prediction_box, prediction_accuracy
     try:
     try:
         a, must = sympy_computing(prediction_accuracy.get())
         a, must = sympy_computing(prediction_accuracy.get())
         output_prompt("预测过程程序可能无响应")
         output_prompt("预测过程程序可能无响应")
@@ -694,968 +730,919 @@ def output_prompt(news):
 
 
 
 
 def function_factory_main():  # H_S-默认函数GF-关闭时询问返回函数
 def function_factory_main():  # H_S-默认函数GF-关闭时询问返回函数
-    global line_style, point_style, func, prompt_num, SCREEN, FONT
-    func = None
-    prompt_num = 0
-    line_style = {
-        "实线": "-",
-        "短横线": "--",
-        "点划线": "-,",
-        "虚线": ":",
-        "点标记": ".",
-        "圆标记": "o",
-        "倒三角": "v",
-        "正三角": "^",
-        "左三角": "&lt",
-        "下箭头": "1",
-        "上箭头": "2",
-        "左箭头": "3",
-        "右箭头": "4",
-        "正方形": "s",
-        "五边形": "p",
-        "星形": "*",
-        "六边形": "h",
-        "六边形2": "H",
-        "+号": "+",
-        "X标记": "x",
-    }  # 函数样式翻译表
-    point_style = ["g", "r", "c", "m", "y", "k"]
-
-    # top = tkinter.Tk()  # 设置屏幕
-    SCREEN = DragWindow()
-    bg_color = "#FFFAFA"  # 主颜色
-    botton_color = "#FFFAFA"  # 按钮颜色
-    word_color = "#000000"  # 文字颜色
-    SCREEN["bg"] = bg_color
-    SCREEN.title("CoTan函数工厂")
-    SCREEN.resizable(width=False, height=False)
-    SCREEN.geometry("+10+10")
-    FONT = (r"Font\ZKST.ttf", 11)  # 设置字体
-    rcParams["font.family"] = "simhei"
-    rcParams["axes.unicode_minus"] = False
-
-    gui_width = 13  # 标准宽度
-    gui_height = 2
-    row = 0
-    column = 1
-    global func_exp, start_definition, end_definition, span_definition, accuracy, func_name, func_style
-    tkinter.Label(
-        SCREEN,
-        text="输入解析式:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    func_exp = tkinter.Entry(SCREEN, width=gui_width * 2)
-    func_exp.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="定义域前端点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    start_definition = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_definition.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="定义域后端点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    end_definition = tkinter.Entry(SCREEN, width=gui_width * 2)
-    end_definition.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="函数绘制跨度:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    span_definition = tkinter.Entry(SCREEN, width=gui_width * 2)
-    span_definition.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="函数计算精度:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    accuracy = tkinter.Entry(SCREEN, width=gui_width * 2)
-    accuracy.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="函数名字:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    func_name = tkinter.Entry(SCREEN, width=gui_width * 2)
-    func_name.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="函数视图:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    func_style = tkinter.Entry(SCREEN, width=gui_width * 2)
-    func_style.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    global default_a, start_a, end_a, span_a
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="常量a默认值:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    default_a = tkinter.Entry(SCREEN, width=gui_width * 2)
-    default_a.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="常量a起点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    start_a = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_a.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="常量a终点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    end_a = tkinter.Entry(SCREEN, width=gui_width * 2)
-    end_a.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="常量a跨度:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    span_a = tkinter.Entry(SCREEN, width=gui_width * 2)
-    span_a.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="应用函数",
-        command=set_function,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row, sticky=tkinter.E + tkinter.W
-    )  # 添加函数
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="绘制图像",
-        command=function_drawing,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="性质预测",
-        command=property_prediction,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column + 2, row=row, sticky=tkinter.E + tkinter.W
-    )  # 添加函数
-
-    global prediction_box, prediction_accuracy
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="预测精度:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    prediction_accuracy = tkinter.Entry(SCREEN, width=gui_width * 2)
-    prediction_accuracy.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    # 显示函数的xy
-    prediction_box = tkinter.Listbox(SCREEN, width=gui_width * 3)  # 暂时不启用多选
-    prediction_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=9,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-
-    column += 3
-    tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
-        column=column, row=0
-    )  # 设置说明
-
-    # 第二排的开始
-    global x_scale, start_x_plot, start_x_polt, span_x_plot, y_scale, start_y_plot, end_y_plot, span_y_plot
-    global start_x_limit, end_x_limit, start_y_limit, end_y_limit
-    column += 1
-    row = 0
-    tkinter.Label(
-        SCREEN,
-        text="X轴刻度声明:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    x_scale = tkinter.Entry(SCREEN, width=gui_width * 2)
-    x_scale.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="X轴刻度起点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    start_x_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_x_plot.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="X轴刻度终点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    start_x_polt = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_x_polt.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="X轴刻度间隔:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    span_x_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
-    span_x_plot.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="Y轴刻度声明:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    y_scale = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_scale.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="Y轴刻度起点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    start_y_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_y_plot.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="Y轴刻度终点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    end_y_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
-    end_y_plot.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="Y轴刻度间隔:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    span_y_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
-    span_y_plot.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="X轴显示起点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    start_x_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_x_limit.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
+    global SCREEN
+    SCREEN.mainloop()
+
+
+SCREEN["bg"] = bg_color
+SCREEN.title("CoTan函数工厂")
+SCREEN.resizable(width=False, height=False)
+SCREEN.geometry("+10+10")
+FONT = (r"Font\ZKST.ttf", 11)  # 设置字体
+rcParams["font.family"] = "simhei"
+rcParams["axes.unicode_minus"] = False
+tkinter.Label(
+    SCREEN,
+    text="输入解析式:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+func_exp = tkinter.Entry(SCREEN, width=gui_width * 2)
+func_exp.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="定义域前端点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_definition = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_definition.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="定义域后端点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+end_definition = tkinter.Entry(SCREEN, width=gui_width * 2)
+end_definition.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="函数绘制跨度:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+span_definition = tkinter.Entry(SCREEN, width=gui_width * 2)
+span_definition.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="函数计算精度:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+accuracy = tkinter.Entry(SCREEN, width=gui_width * 2)
+accuracy.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="函数名字:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+func_name = tkinter.Entry(SCREEN, width=gui_width * 2)
+func_name.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="函数视图:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+func_style = tkinter.Entry(SCREEN, width=gui_width * 2)
+func_style.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="常量a默认值:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+default_a = tkinter.Entry(SCREEN, width=gui_width * 2)
+default_a.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="常量a起点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_a = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_a.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="常量a终点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+end_a = tkinter.Entry(SCREEN, width=gui_width * 2)
+end_a.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="常量a跨度:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+span_a = tkinter.Entry(SCREEN, width=gui_width * 2)
+span_a.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="应用函数",
+    command=set_function,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row, sticky=tkinter.E + tkinter.W
+)  # 添加函数
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="绘制图像",
+    command=function_drawing,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="性质预测",
+    command=property_prediction,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column + 2, row=row, sticky=tkinter.E + tkinter.W
+)  # 添加函数
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="预测精度:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+prediction_accuracy = tkinter.Entry(SCREEN, width=gui_width * 2)
+prediction_accuracy.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+# 显示函数的xy
+prediction_box = tkinter.Listbox(SCREEN, width=gui_width * 3)  # 暂时不启用多选
+prediction_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=9,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+
+column += 3
+tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
+    column=column, row=0
+)  # 设置说明
+
+# 第二排的开始
+column += 1
+row = 0
+tkinter.Label(
+    SCREEN,
+    text="X轴刻度声明:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+x_scale = tkinter.Entry(SCREEN, width=gui_width * 2)
+x_scale.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="X轴刻度起点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_x_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_x_plot.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="X轴刻度终点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_x_polt = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_x_polt.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="X轴刻度间隔:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+span_x_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
+span_x_plot.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="Y轴刻度声明:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+y_scale = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_scale.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="Y轴刻度起点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_y_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_y_plot.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="Y轴刻度终点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+end_y_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
+end_y_plot.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="Y轴刻度间隔:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+span_y_plot = tkinter.Entry(SCREEN, width=gui_width * 2)
+span_y_plot.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="X轴显示起点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_x_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_x_limit.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="X轴显示终点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+end_x_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
+end_x_limit.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="Y轴显示起点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+start_y_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
+start_y_limit.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="Y轴显示终点:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+end_y_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
+end_y_limit.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="帧率(帧/ms):",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+frame_rate = tkinter.Entry(SCREEN, width=gui_width * 2)
+frame_rate.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+show_point = tkinter.IntVar()
+show_best_value = tkinter.IntVar()
+show_text = tkinter.IntVar()
+
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="显示记忆点",
+    variable=show_point,
+).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="显示最值",
+    variable=show_best_value,
+).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
+tkinter.Checkbutton(
+    SCREEN,
+    bg=bg_color,
+    fg=word_color,
+    activebackground=bg_color,
+    activeforeground=word_color,
+    selectcolor=bg_color,
+    text="显示文字",
+    variable=show_text,
+).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
+
+row += 1
+# 显示函数的xy
+plot_type = tkinter.Listbox(
+    SCREEN, width=gui_width * 3, height=gui_height * 4
+)  # 暂时不启用多选
+plot_type.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=3,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+plot_type.insert(
+    tkinter.END,
+    *[
+        "笛卡尔坐标系静态图像(默认)",
+        "矩形坐标系静态图像",
+        "笛卡尔坐标系动态图像",
+        "矩形坐标系动态图像",
+        "笛卡尔坐标系静态图像(无线框)",
+        "矩形坐标系静态图像(无线框)",
+        "笛卡尔坐标系动态图像(无线框)",
+        "矩形坐标系动态图像(无线框)",
+        "笛卡尔坐标系动态画图",
+        "矩形坐标系动态画图",
+    ],
+)
+row += 3
+# 显示函数的xy
+prompt_box = tkinter.Listbox(
+    SCREEN, width=gui_width * 3, height=gui_height * 2
+)  # 暂时不启用多选
+prompt_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=2,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+
+column += 3
+tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
+    column=column, row=0
+)  # 设置说明
+
+column += 1
+row = 0
+tkinter.Label(
+    SCREEN,
+    text="计算(y):",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+x_value = tkinter.Entry(SCREEN, width=gui_width * 2)
+x_value.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="二分法计算(x):",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+y_value = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_value.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+dicon_parameters = []  # 二分法参数输入
+name_list = [
+    "最大迭代数",
+    "计算精度",
+    "最值允许偏移量",
+    "零点最小间隔",
+    "减少计算",
+    "允许梯度计算",
+    "最大扩张深度",
+    "扩张限制",
+    "扩张偏移量",
+    "开启二级验证",
+    "二级验证程度",
+]
+for i in range(11):
     row += 1
     row += 1
+    dicon_parameters.append(tkinter.StringVar())
     tkinter.Label(
     tkinter.Label(
         SCREEN,
         SCREEN,
-        text="X轴显示终点:",
         bg=bg_color,
         bg=bg_color,
         fg=word_color,
         fg=word_color,
+        text=name_list[i] + ":",
         font=FONT,
         font=FONT,
         width=gui_width,
         width=gui_width,
         height=gui_height,
         height=gui_height,
     ).grid(
     ).grid(
         column=column, row=row
         column=column, row=row
     )  # 设置说明
     )  # 设置说明
-    end_x_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
-    end_x_limit.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
+    tkinter.Entry(
+        SCREEN, width=gui_width * 2, textvariable=dicon_parameters[-1]
+    ).grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="梯度法计算(x):",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+y_value_gradient = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_value_gradient.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+gradient_parameters = []  # 梯度法法参数输入
+name_list = ["梯度起点", "梯度终点", "计算深度", "计算精度"]
+for i in range(4):
     row += 1
     row += 1
+    gradient_parameters.append(tkinter.StringVar())
     tkinter.Label(
     tkinter.Label(
         SCREEN,
         SCREEN,
-        text="Y轴显示起点:",
         bg=bg_color,
         bg=bg_color,
         fg=word_color,
         fg=word_color,
+        text=name_list[i] + ":",
         font=FONT,
         font=FONT,
         width=gui_width,
         width=gui_width,
         height=gui_height,
         height=gui_height,
     ).grid(
     ).grid(
         column=column, row=row
         column=column, row=row
     )  # 设置说明
     )  # 设置说明
-    start_y_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
-    start_y_limit.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="Y轴显示终点:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    end_y_limit = tkinter.Entry(SCREEN, width=gui_width * 2)
-    end_y_limit.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    global frame_rate
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="帧率(帧/ms):",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    frame_rate = tkinter.Entry(SCREEN, width=gui_width * 2)
-    frame_rate.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    global show_point, show_best_value, show_text
-    row += 1
-    show_point = tkinter.IntVar()
-    show_best_value = tkinter.IntVar()
-    show_text = tkinter.IntVar()
-
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="显示记忆点",
-        variable=show_point,
-    ).grid(column=column, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="显示最值",
-        variable=show_best_value,
-    ).grid(column=column + 1, row=row, sticky=tkinter.E + tkinter.W)
-    tkinter.Checkbutton(
-        SCREEN,
-        bg=bg_color,
-        fg=word_color,
-        activebackground=bg_color,
-        activeforeground=word_color,
-        selectcolor=bg_color,
-        text="显示文字",
-        variable=show_text,
-    ).grid(column=column + 2, row=row, sticky=tkinter.E + tkinter.W)
-
-    global prompt_box, plot_type
-    row += 1
-    # 显示函数的xy
-    plot_type = tkinter.Listbox(
-        SCREEN, width=gui_width * 3, height=gui_height * 4
-    )  # 暂时不启用多选
-    plot_type.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=3,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-    plot_type.insert(
-        tkinter.END,
-        *[
-            "笛卡尔坐标系静态图像(默认)",
-            "矩形坐标系静态图像",
-            "笛卡尔坐标系动态图像",
-            "矩形坐标系动态图像",
-            "笛卡尔坐标系静态图像(无线框)",
-            "矩形坐标系静态图像(无线框)",
-            "笛卡尔坐标系动态图像(无线框)",
-            "矩形坐标系动态图像(无线框)",
-            "笛卡尔坐标系动态画图",
-            "矩形坐标系动态画图",
-        ],
-    )
-    row += 3
-    # 显示函数的xy
-    prompt_box = tkinter.Listbox(
-        SCREEN, width=gui_width * 3, height=gui_height * 2
-    )  # 暂时不启用多选
-    prompt_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=2,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-
-    column += 3
-    tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
-        column=column, row=0
-    )  # 设置说明
-
-    global x_value, y_value, dicon_parameters, y_value_gradient, gradient_parameters, result_box
-    column += 1
-    row = 0
-    tkinter.Label(
-        SCREEN,
-        text="计算(y):",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    x_value = tkinter.Entry(SCREEN, width=gui_width * 2)
-    x_value.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="二分法计算(x):",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    y_value = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_value.grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    dicon_parameters = []  # 二分法参数输入
-    name_list = [
-        "最大迭代数",
-        "计算精度",
-        "最值允许偏移量",
-        "零点最小间隔",
-        "减少计算",
-        "允许梯度计算",
-        "最大扩张深度",
-        "扩张限制",
-        "扩张偏移量",
-        "开启二级验证",
-        "二级验证程度",
-    ]
-    for i in range(11):
-        row += 1
-        dicon_parameters.append(tkinter.StringVar())
-        tkinter.Label(
-            SCREEN,
-            bg=bg_color,
-            fg=word_color,
-            text=name_list[i] + ":",
-            font=FONT,
-            width=gui_width,
-            height=gui_height,
-        ).grid(
-            column=column, row=row
-        )  # 设置说明
-        tkinter.Entry(
-            SCREEN, width=gui_width * 2, textvariable=dicon_parameters[-1]
-        ).grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="梯度法计算(x):",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    y_value_gradient = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_value_gradient.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    gradient_parameters = []  # 梯度法法参数输入
-    name_list = ["梯度起点", "梯度终点", "计算深度", "计算精度"]
-    for i in range(4):
-        row += 1
-        gradient_parameters.append(tkinter.StringVar())
-        tkinter.Label(
-            SCREEN,
-            bg=bg_color,
-            fg=word_color,
-            text=name_list[i] + ":",
-            font=FONT,
-            width=gui_width,
-            height=gui_height,
-        ).grid(
-            column=column, row=row
-        )  # 设置说明
-        tkinter.Entry(
-            SCREEN, width=gui_width * 2, textvariable=gradient_parameters[-1]
-        ).grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, height=1).grid(
-        column=1, row=row
-    )  # 底部
-
-    column += 3
-    tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
-        column=column, row=0
-    )  # 设置说明
-
-    global y_value_symbol, x_value_derivation, proximity_accuracy
-
-    column += 1
-    row = 0
-
-    tkinter.Label(
-        SCREEN,
-        text="代数法计算(x):",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    y_value_symbol = tkinter.Entry(SCREEN, width=gui_width * 2)
-    y_value_symbol.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="求(x)导数:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    x_value_derivation = tkinter.Entry(SCREEN, width=gui_width * 2)
-    x_value_derivation.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Label(
-        SCREEN,
-        text="逼近求导精度:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    proximity_accuracy = tkinter.Entry(SCREEN, width=gui_width * 2)
-    proximity_accuracy.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="计算(y)",
-        command=calculate,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row
-    )  # 设置说明
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="二分法计算(x)",
-        command=dichotomy,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="梯度法计算(x)",
-        command=gradient_method_calculation,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="代数法计算",
-        command=sympy_calculation_x,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="逼近法导数计算",
-        command=approximation,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="导数计算",
-        command=function_differentiation,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
-
-    row += 1
-    k = 5
-    result_box = tkinter.Listbox(SCREEN, height=gui_height * (k - 1))  # 暂时不启用多选
-    result_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=k,
-        sticky=tkinter.N + tkinter.E + tkinter.W,
-    )
-
-    global projection_value, projection_box
-    row += k - 1
-    tkinter.Label(
-        SCREEN,
-        text="性质预测值:",
-        bg=bg_color,
-        fg=word_color,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row, sticky=tkinter.N + tkinter.S
-    )  # 设置说明
-    projection_value = tkinter.Entry(SCREEN, width=gui_width * 2)
-    projection_value.grid(
-        column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
-    )
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="周期性",
-        command=check_periodic,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="对称轴",
-        command=check_symmetry_axis,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 1, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="对称中心",
-        command=check_center_of_symmetry,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
-
-    row += 1
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="单调性",
-        command=check_monotonic,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(
-        column=column, row=row, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
-    )
-
-    row += 1
-    # 显示函数的xy
-    projection_box = tkinter.Listbox(
-        SCREEN, width=gui_width * 3, height=gui_height * 5
-    )  # 暂时不启用多选
-    projection_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=6,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-
-    column += 3
-    tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
-        column=column, row=0
-    )  # 设置说明
-
-    column += 1
-    row = 0
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="生成表格",
-        command=to_sheet,
-        font=FONT,
-        width=gui_width * 2,
-        height=gui_height,
-    ).grid(column=column, row=row, columnspan=2)
-    tkinter.Button(
-        SCREEN,
-        bg=botton_color,
-        fg=word_color,
-        text="导出表格",
-        command=save_to_csv,
-        font=FONT,
-        width=gui_width,
-        height=gui_height,
-    ).grid(column=column + 2, row=row)
-
-    global sheet_box
-    row += 1
-    # 显示函数的xy
-    sheet_box = tkinter.Listbox(SCREEN, width=gui_width * 3)  # 暂时不启用多选
-    sheet_box.grid(
-        column=column,
-        row=row,
-        columnspan=3,
-        rowspan=17,
-        sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
-    )
-
-    output_prompt("加载完毕")
-    tkinter.mainloop()
+    tkinter.Entry(
+        SCREEN, width=gui_width * 2, textvariable=gradient_parameters[-1]
+    ).grid(column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, height=1).grid(
+    column=1, row=row
+)  # 底部
+
+column += 3
+tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
+    column=column, row=0
+)  # 设置说明
+
+column += 1
+row = 0
+
+tkinter.Label(
+    SCREEN,
+    text="代数法计算(x):",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+y_value_symbol = tkinter.Entry(SCREEN, width=gui_width * 2)
+y_value_symbol.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="求(x)导数:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+x_value_derivation = tkinter.Entry(SCREEN, width=gui_width * 2)
+x_value_derivation.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Label(
+    SCREEN,
+    text="逼近求导精度:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+proximity_accuracy = tkinter.Entry(SCREEN, width=gui_width * 2)
+proximity_accuracy.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="计算(y)",
+    command=calculate,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row
+)  # 设置说明
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="二分法计算(x)",
+    command=dichotomy,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="梯度法计算(x)",
+    command=gradient_method_calculation,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="代数法计算",
+    command=sympy_calculation_x,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="逼近法导数计算",
+    command=approximation,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="导数计算",
+    command=function_differentiation,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
+
+row += 1
+k = 5
+result_box = tkinter.Listbox(SCREEN, height=gui_height * (k - 1))  # 暂时不启用多选
+result_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=k,
+    sticky=tkinter.N + tkinter.E + tkinter.W,
+)
+
+row += k - 1
+tkinter.Label(
+    SCREEN,
+    text="性质预测值:",
+    bg=bg_color,
+    fg=word_color,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row, sticky=tkinter.N + tkinter.S
+)  # 设置说明
+projection_value = tkinter.Entry(SCREEN, width=gui_width * 2)
+projection_value.grid(
+    column=column + 1, row=row, columnspan=2, sticky=tkinter.E + tkinter.W
+)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="周期性",
+    command=check_periodic,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="对称轴",
+    command=check_symmetry_axis,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 1, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="对称中心",
+    command=check_center_of_symmetry,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row, sticky=tkinter.N + tkinter.E + tkinter.W)
+
+row += 1
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="单调性",
+    command=check_monotonic,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(
+    column=column, row=row, columnspan=3, sticky=tkinter.N + tkinter.E + tkinter.W
+)
+
+row += 1
+# 显示函数的xy
+projection_box = tkinter.Listbox(
+    SCREEN, width=gui_width * 3, height=gui_height * 5
+)  # 暂时不启用多选
+projection_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=6,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+
+column += 3
+tkinter.Label(SCREEN, text="", bg=bg_color, fg=word_color, font=FONT, width=1).grid(
+    column=column, row=0
+)  # 设置说明
+
+column += 1
+row = 0
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="生成表格",
+    command=to_sheet,
+    font=FONT,
+    width=gui_width * 2,
+    height=gui_height,
+).grid(column=column, row=row, columnspan=2)
+tkinter.Button(
+    SCREEN,
+    bg=botton_color,
+    fg=word_color,
+    text="导出表格",
+    command=save_to_csv,
+    font=FONT,
+    width=gui_width,
+    height=gui_height,
+).grid(column=column + 2, row=row)
+
+row += 1
+# 显示函数的xy
+sheet_box = tkinter.Listbox(SCREEN, width=gui_width * 3)  # 暂时不启用多选
+sheet_box.grid(
+    column=column,
+    row=row,
+    columnspan=3,
+    rowspan=17,
+    sticky=tkinter.S + tkinter.N + tkinter.E + tkinter.W,
+)
+
+output_prompt("加载完毕")

+ 2 - 1
HSCH/HS.py

@@ -1,9 +1,10 @@
 from __future__ import division  # 让/恢复为除法
 from __future__ import division  # 让/恢复为除法
-import pandas
 import tkinter
 import tkinter
 import tkinter.messagebox
 import tkinter.messagebox
 from tkinter.filedialog import asksaveasfile
 from tkinter.filedialog import asksaveasfile
 import tkinter.messagebox
 import tkinter.messagebox
+
+import pandas
 import sympy
 import sympy
 
 
 
 

+ 13 - 13
Machine_learning_analysis/Learn_Numpy.py

@@ -1,7 +1,10 @@
-from scipy.fftpack import fft, ifft  # 快速傅里叶变换
+import re
+from os.path import split as path_split
+from os.path import exists, basename, splitext
+from os import mkdir, getcwd
+import tarfile
+
 from sklearn.svm import SVC, SVR  # SVC是svm分类,SVR是svm回归
 from sklearn.svm import SVC, SVR  # SVC是svm分类,SVR是svm回归
-from pyecharts.components import Table as TableFisrt  # 绘制表格
-from scipy import optimize
 from sklearn.cluster import KMeans, AgglomerativeClustering, DBSCAN
 from sklearn.cluster import KMeans, AgglomerativeClustering, DBSCAN
 from sklearn.manifold import TSNE
 from sklearn.manifold import TSNE
 from sklearn.neural_network import MLPClassifier, MLPRegressor
 from sklearn.neural_network import MLPClassifier, MLPRegressor
@@ -17,26 +20,23 @@ from sklearn.ensemble import (
     GradientBoostingClassifier,
     GradientBoostingClassifier,
     GradientBoostingRegressor,
     GradientBoostingRegressor,
 )
 )
+import numpy as np
+import matplotlib.pyplot as plt
+from pandas import DataFrame, read_csv
 from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor, export_graphviz
 from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor, export_graphviz
 from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
 from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
 from sklearn.linear_model import *
 from sklearn.linear_model import *
 from sklearn.model_selection import train_test_split
 from sklearn.model_selection import train_test_split
-import re
-import numpy as np
-from pandas import DataFrame, read_csv
-import matplotlib.pyplot as plt
+import joblib
+from scipy.fftpack import fft, ifft  # 快速傅里叶变换
+from scipy import optimize
 from scipy.cluster.hierarchy import dendrogram, ward
 from scipy.cluster.hierarchy import dendrogram, ward
+from pyecharts.components import Table as TableFisrt  # 绘制表格
 from pyecharts.options.series_options import JsCode
 from pyecharts.options.series_options import JsCode
 from pyecharts.charts import Tab as tab_First
 from pyecharts.charts import Tab as tab_First
 from pyecharts.charts import *
 from pyecharts.charts import *
-from random import randint
 from pyecharts import options as opts
 from pyecharts import options as opts
 from pyecharts.components import Image
 from pyecharts.components import Image
-from os.path import split as path_split
-from os.path import exists, basename, splitext
-from os import mkdir, getcwd
-import tarfile
-import joblib
 from pyecharts.globals import CurrentConfig
 from pyecharts.globals import CurrentConfig
 
 
 CurrentConfig.ONLINE_HOST = f"{getcwd()}/assets/"
 CurrentConfig.ONLINE_HOST = f"{getcwd()}/assets/"

File diff suppressed because it is too large
+ 23 - 1679
Machine_learning_analysis/Machine_learning.py


Some files were not shown because too many files changed in this diff