|
|
|
@ -2,33 +2,25 @@ import glob
|
|
|
|
|
import wx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Example(wx.Frame):
|
|
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
|
super(Example, self).__init__(*args, **kwargs)
|
|
|
|
|
self.InitUI()
|
|
|
|
|
|
|
|
|
|
def InitUI(self):
|
|
|
|
|
vbox = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
|
|
|
|
|
|
class ServerPanel(wx.Panel):
|
|
|
|
|
def __init__(self, parent):
|
|
|
|
|
super().__init__(parent)
|
|
|
|
|
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
|
|
|
|
|
|
toolbar1 = wx.ToolBar(self)
|
|
|
|
|
toolbar1.AddTool(wx.ID_ANY, '', wx.Bitmap('pigeonLOGO.png'))
|
|
|
|
|
toolbar1.Realize()
|
|
|
|
|
vbox.Add(toolbar1, 0, wx.EXPAND)
|
|
|
|
|
main_sizer.Add(toolbar1, 0, wx.EXPAND)
|
|
|
|
|
self.Bind(wx.EVT_TOOL, self.OnQuit)
|
|
|
|
|
|
|
|
|
|
self.SetSizer(vbox)
|
|
|
|
|
self.SetSizer(main_sizer)
|
|
|
|
|
|
|
|
|
|
self.SetSize((350, 250))
|
|
|
|
|
self.Centre()
|
|
|
|
|
|
|
|
|
|
def OnQuit(self, e):
|
|
|
|
|
self.Close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ServerPanel(wx.Panel):
|
|
|
|
|
def __init__(self, parent):
|
|
|
|
|
super().__init__(parent)
|
|
|
|
|
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
|
self.row_obj_dict = {}
|
|
|
|
|
|
|
|
|
|
self.list_ctrl = wx.ListCtrl(
|
|
|
|
@ -65,6 +57,9 @@ class ServerPanel(wx.Panel):
|
|
|
|
|
main_sizer.Add(start_button, 0, wx.ALL | 100, 5)
|
|
|
|
|
main_sizer.Add(stop_button, 0, wx.ALL | 100, 5)
|
|
|
|
|
self.SetSizer(main_sizer)
|
|
|
|
|
|
|
|
|
|
def OnQuit(self, e):
|
|
|
|
|
self.Close()
|
|
|
|
|
|
|
|
|
|
def on_edit(self, event):
|
|
|
|
|
print('in on_edit')
|
|
|
|
@ -76,13 +71,12 @@ class ServerFrame(wx.Frame):
|
|
|
|
|
def __init__(self):
|
|
|
|
|
super().__init__(parent=None,
|
|
|
|
|
title='Server Dashboard')
|
|
|
|
|
|
|
|
|
|
self.panel = ServerPanel(self)
|
|
|
|
|
self.frame = Example(self)
|
|
|
|
|
self.Show()
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
app = wx.App(False)
|
|
|
|
|
frame = ServerFrame()
|
|
|
|
|
ex = Example(None)
|
|
|
|
|
ex.Show()
|
|
|
|
|
|
|
|
|
|
app.MainLoop()
|