提交 0772b307 编写于 作者: 魔术师Dix's avatar 魔术师Dix

修改界面显示;

上级 3ce81eac
......@@ -2,10 +2,14 @@
import Scripts.UI as UI;
import Scripts.Utils as Utils;
UI.MainWindow.Init("111");
#初始化参数设置
UI.MainWindow.Init("算法图解操作界面");
UI.MainWindow.SetSize(500,800);
#添加各种方法
entry = MethodEntry();
UI.MainWindow.AddMethodEntry(entry);
UI.MainWindow.Run();
\ No newline at end of file
#运行窗口
UI.MainWindow.Run();
print("执行完成,关闭程序...");
\ No newline at end of file
class MethodEntry(object):
def GetMethodName(self) -> str:
return "None Method";
return "...空方法...";
def RunMethod(self,evt):
print("Non Method To Execude !");
print("没有需要执行的功能 !");
pass;
pass
\ No newline at end of file
......@@ -8,6 +8,9 @@ class MainWindow:
app=None;
window=None;
panel=None;
FrameLength=20;
safeWidth=0;
safeHeight=0;
def Init(title:str):
MainWindow.app=wx.App();
......@@ -17,6 +20,8 @@ class MainWindow:
def SetSize(width,height : int):
MainWindow.window.Size=(width,height);
MainWindow.safeWidth=width-MainWindow.FrameLength;
MainWindow.safeHeight=height-MainWindow.safeHeight;
pass;
def Run():
......@@ -38,8 +43,8 @@ class MainWindow:
print("当前有按钮:"+str(length));
#刷新按钮
height=50;
width=100;
height=MainWindow.FrameLength+10;
width=MainWindow.FrameLength+10;
for x in MainWindow.ListEntry:
MainWindow.CreateButton(x,width,height);
height=height+100;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册