You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.5 KiB
35 lines
1.5 KiB
import wx
|
|
from dialogs import (
|
|
shop, inputshop, outputshop, courier, inputcourier, outputcourier,
|
|
server, inputserver, outputserver, bookinformmation, book, outbook, amend
|
|
)
|
|
|
|
def create_static_texts(panel):
|
|
wx.StaticText(panel, wx.ID_ANY, u"关于店铺:", (20, 20))
|
|
wx.StaticText(panel, wx.ID_ANY, u"关于派送员:", (20, 90))
|
|
wx.StaticText(panel, wx.ID_ANY, u"关于客服人员:", (20, 160))
|
|
wx.StaticText(panel, wx.ID_ANY, u"关于订单:", (20, 230))
|
|
|
|
def create_buttons(frame, panel):
|
|
buttons_info = [
|
|
(u"店铺信息", (130, 20), shop),
|
|
(u"店铺上架", (250, 20), inputshop),
|
|
(u"店铺下架", (370, 20), outputshop),
|
|
(u"派送员信息", (130, 90), courier),
|
|
(u"聘请派送员", (250, 90), inputcourier),
|
|
(u"解雇派送员", (370, 90), outputcourier),
|
|
(u"客服人员信息", (130, 160), server),
|
|
(u"聘请客服人员", (250, 160), inputserver),
|
|
(u"解雇客服人员", (370, 160), outputserver),
|
|
(u"订单信息", (130, 230), bookinformmation),
|
|
(u"学生订餐", (250, 230), book),
|
|
(u"取消订单", (370, 230), outbook),
|
|
(u"修改订单", (490, 230), amend),
|
|
]
|
|
|
|
for label, pos, dialog_class in buttons_info:
|
|
button = wx.Button(panel, wx.ID_ANY, label, pos, wx.DefaultSize, style=wx.BORDER_MASK)
|
|
button.Bind(wx.EVT_BUTTON, lambda event, dlg=dialog_class: dlg(frame).ShowModal())
|
|
|
|
panel.SetBackgroundColour('white')
|