|
|
@ -1,7 +1,31 @@
|
|
|
|
import glob
|
|
|
|
import glob
|
|
|
|
import wx
|
|
|
|
import wx
|
|
|
|
|
|
|
|
|
|
|
|
class ServerPanel(wx.Panel):
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
toolbar1 = wx.ToolBar(self)
|
|
|
|
|
|
|
|
toolbar1.AddTool(wx.ID_ANY, '', wx.Bitmap('pigeonLOGO.png'))
|
|
|
|
|
|
|
|
toolbar1.Realize()
|
|
|
|
|
|
|
|
vbox.Add(toolbar1, 0, wx.EXPAND)
|
|
|
|
|
|
|
|
self.Bind(wx.EVT_TOOL, self.OnQuit)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.SetSizer(vbox)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.SetSize((350, 250))
|
|
|
|
|
|
|
|
self.Centre()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def OnQuit(self, e):
|
|
|
|
|
|
|
|
self.Close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ServerPanel(wx.Panel):
|
|
|
|
def __init__(self, parent):
|
|
|
|
def __init__(self, parent):
|
|
|
|
super().__init__(parent)
|
|
|
|
super().__init__(parent)
|
|
|
|
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
|
|
@ -23,6 +47,7 @@ class ServerPanel(wx.Panel):
|
|
|
|
self.list_ctrl.InsertColumn(9, 'Duration', width=140)
|
|
|
|
self.list_ctrl.InsertColumn(9, 'Duration', width=140)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## To add checkboxes for whether or not something is blocked
|
|
|
|
## To add checkboxes for whether or not something is blocked
|
|
|
|
##idx = 0
|
|
|
|
##idx = 0
|
|
|
|
##for i in varNameForBlock:
|
|
|
|
##for i in varNameForBlock:
|
|
|
@ -52,9 +77,12 @@ class ServerFrame(wx.Frame):
|
|
|
|
super().__init__(parent=None,
|
|
|
|
super().__init__(parent=None,
|
|
|
|
title='Server Dashboard')
|
|
|
|
title='Server Dashboard')
|
|
|
|
self.panel = ServerPanel(self)
|
|
|
|
self.panel = ServerPanel(self)
|
|
|
|
|
|
|
|
self.frame = Example(self)
|
|
|
|
self.Show()
|
|
|
|
self.Show()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|
app = wx.App(False)
|
|
|
|
app = wx.App(False)
|
|
|
|
frame = ServerFrame()
|
|
|
|
frame = ServerFrame()
|
|
|
|
|
|
|
|
ex = Example(None)
|
|
|
|
|
|
|
|
ex.Show()
|
|
|
|
app.MainLoop()
|
|
|
|
app.MainLoop()
|