From 0ed2c53acd278d57a39390fd4db78c5aaf088e0a Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 21 四月 2023 18:03:54 +0800 Subject: [PATCH] 开盘啦数据解析 --- gui.py | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/gui.py b/gui.py index fdd0f77..a926581 100644 --- a/gui.py +++ b/gui.py @@ -3,6 +3,8 @@ """ from tkinter import * from tkinter.messagebox import * + +import numpy import tkintertable import win32gui @@ -142,9 +144,6 @@ for i in range(0, len(content)): text.tag_add('error', "{}.{}".format(line, i)) - def sync_target_codes(): - server.sync_target_codes_to_ths() - def click(): text.delete('1.0', END) @@ -206,9 +205,6 @@ btn = Button(frame, text="杩愯鐜妫�娴�", command=click) btn.place(x=5, y=5) - - btn = Button(frame, text="鍚屾THS鐩爣鏍囩殑", command=sync_target_codes) - btn.place(x=100, y=5) frame.grid(row=1, column=2) @@ -327,7 +323,12 @@ def re_distribute_buy_win(): try: - juejin.distribute_buy_win() + if tool.trade_time_sub(tool.get_now_time_str(), "09:30:00") > 0: + raise Exception("鍙兘9:30涔嬪墠閲嶆柊鍒嗛厤绐楀彛") + datas = JueJinManager.get_codes_limit_rate(gpcode_manager.get_gp_list()) + matrix = numpy.array(datas) + codes = matrix[:, 0].tolist() + trade_gui.re_distribute_buy_win(codes) refresh_trade_buy_win_data() showinfo("鎻愮ず", "鍒嗛厤瀹屾垚") except Exception as e: @@ -347,7 +348,8 @@ normal = False try: trade_gui.THSGuiTrade.checkEnv() - cl_win.configure(text="姝e父", foreground="#008000") + cancel_win_num = trade_gui.THSGuiTrade.getCancelBuyWins() + cl_win.configure(text=f"姝e父({len(cancel_win_num)})", foreground="#008000") except Exception as e: normal = False cl_win.configure(text="寮傚父:{}".format(str(e)), foreground="#FF7F27") @@ -610,7 +612,21 @@ width = 800 height = 360 frame = Frame(root, {"height": height, "width": width, "bg": "#DDDDDD"}) - cl = Label(frame, text="L2閲囬泦鐘舵��", bg="#DDDDDD") + trade_info= "" + for_color = "#008000" + if constant.TEST: + trade_info += "娴嬭瘯鐜" + for_color = "#FF7F27" + else: + trade_info += "姝e紡鐜" + trade_info += " " + if constant.TRADE_ENABLE: + trade_info += "鍒濆鍏佽浜ゆ槗" + else: + trade_info += "鍒濆绂佹浜ゆ槗" + for_color = "#FF7F27" + + cl = Label(frame, text=f"{trade_info}", bg="#DDDDDD",foreground=f"{for_color}") cl.place(x=5, y=5) accept_l2 = IntVar() -- Gitblit v1.8.0