|
|
@@ -1,7 +1,7 @@
|
|
|
"""Главное окно приложения"""
|
|
|
|
|
|
from typing import Any
|
|
|
-from tkinter import Tk,LabelFrame
|
|
|
+from tkinter import Tk,LabelFrame,Frame,Label
|
|
|
|
|
|
from pakApp.pakGui.pakWinMain.pakFrmCmd.modFrmCmd import FrmCmd
|
|
|
|
|
|
@@ -12,11 +12,12 @@ class WinMain(Tk):
|
|
|
self.gui:Any=gui
|
|
|
self.title("БотоФерма WarTank")
|
|
|
self.geometry("800x640")
|
|
|
+ self.dict_bot:list[str]=[]
|
|
|
|
|
|
def run(self)->None:
|
|
|
self.frmCmd=FrmCmd(self)
|
|
|
self.frmListBot=LabelFrame(self,text="Список ботов")
|
|
|
- self.frmListBot.pack(fill="both",expand=True)
|
|
|
+ self.frmListBot.pack(fill="both",expand=1)
|
|
|
self.update_list_bot()
|
|
|
self.mainloop()
|
|
|
|
|
|
@@ -25,3 +26,14 @@ class WinMain(Tk):
|
|
|
print("WinMain.update_list_bot()")
|
|
|
list_bot:Any=self.app.logic.get_list_bot()
|
|
|
print(f"WinMain.update_list_bot(): list_bot={list_bot}")
|
|
|
+ self.frmListBot.destroy()
|
|
|
+ self.dict_bot=[]
|
|
|
+ self.frmListBot=LabelFrame(self,text="Список ботов")
|
|
|
+ self.frmListBot.pack(fill="both",expand=1)
|
|
|
+ for bot_name in list_bot:
|
|
|
+ frmBot=Frame(self.frmListBot, border=3,relief="sunken")
|
|
|
+ frmBot.pack(fill="x", side="top")
|
|
|
+ lblName=Label(frmBot, text="["+bot_name+"]")
|
|
|
+ lblName.pack(side="left")
|
|
|
+ self.dict_bot.append(bot_name)
|
|
|
+
|