Compare commits
11 Commits
1666679951
...
fuckyUI
Author | SHA1 | Date | |
---|---|---|---|
f56b145097 | |||
43f0f2ad3a | |||
12f93c04d2 | |||
37231e8b57 | |||
c6f45ae2d9 | |||
c9e71c7376 | |||
870a4559f8 | |||
6997899788 | |||
84003128e6 | |||
4298d8da16 | |||
f80115da99 |
BIN
IPPigeonLogo.png
Normal file
BIN
IPPigeonLogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
90
helloWorld.py
Normal file
90
helloWorld.py
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import glob
|
||||||
|
import wx
|
||||||
|
import wx.lib.buttons as buttons
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ServerPanel(wx.Frame):
|
||||||
|
def __init__(self, parent):
|
||||||
|
super().__init__(parent)
|
||||||
|
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||||
|
secondary_sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
|
||||||
|
menubar = wx.MenuBar()
|
||||||
|
menu = wx.Menu()
|
||||||
|
menubar.Append(menu,"File")
|
||||||
|
self.SetMenuBar(menubar)
|
||||||
|
|
||||||
|
tb = wx.ToolBar( self, -1)
|
||||||
|
self.ToolBar = tb
|
||||||
|
|
||||||
|
#home/data, settings, profile/logout
|
||||||
|
tb.AddTool(wx.ID_ANY, '',wx.Bitmap("WXPython.png"))
|
||||||
|
tb.AddTool(wx.ID_ANY, '',wx.Bitmap("settings.png"))
|
||||||
|
tb.AddTool( wx.ID_ANY, '', wx.Bitmap("profileIMG.png"))
|
||||||
|
#tb.Bind(wx.EVT_TOOL, self.Onright)
|
||||||
|
#tb.Bind(wx.EVT_COMBOBOX,self.OnCombo)
|
||||||
|
#self.combo = wx.ComboBox( tb, 555, value = "Times", choices = ["Papyrus","Times","Comic Sans"])
|
||||||
|
|
||||||
|
|
||||||
|
#tb.AddControl(self.combo )
|
||||||
|
tb.Realize()
|
||||||
|
main_sizer.Add(tb)
|
||||||
|
|
||||||
|
self.Show(True)
|
||||||
|
|
||||||
|
|
||||||
|
self.row_obj_dict = {}
|
||||||
|
self.list_ctrl = wx.ListCtrl(
|
||||||
|
self, size=(-1, 100),
|
||||||
|
style=wx.LC_REPORT | wx.BORDER_SUNKEN
|
||||||
|
)
|
||||||
|
self.SetBackgroundColour(wx.BLACK)
|
||||||
|
self.list_ctrl.InsertColumn(0, 'Server name', width=140)
|
||||||
|
self.list_ctrl.InsertColumn(1, 'Port number', width=140)
|
||||||
|
self.list_ctrl.InsertColumn(2, 'Status', width=200)
|
||||||
|
main_sizer.Add(self.list_ctrl, 0, wx.ALL | wx.EXPAND, 5)
|
||||||
|
start_button = wx.Button(self, label='Start')
|
||||||
|
start_button.SetBackgroundColour((205, 215, 206))
|
||||||
|
start_button.Bind(wx.EVT_BUTTON, self.on_edit)
|
||||||
|
stop_button = wx.Button(self, label='Stop')
|
||||||
|
stop_button.SetBackgroundColour('#F08080')
|
||||||
|
# wx.BORDER(stop_button, wx.BORDER_NONE)
|
||||||
|
stop_button.Bind(wx.EVT_BUTTON, self.on_edit)
|
||||||
|
main_sizer.Add(start_button, 0, wx.CENTER | 100, 5)
|
||||||
|
main_sizer.Add(stop_button, 0, wx.CENTER | 100, 5)
|
||||||
|
# start_button.SetWindowStyleFlag(wx.SIMPLE_BORDER)
|
||||||
|
# stop_button.SetWindowStyleFlag(wx.SIMPLE_BORDER)
|
||||||
|
# wx.StaticBitmap(self, -1, png, (500, 300), (png.GetWidth(), png.GetHeight()))
|
||||||
|
self.SetSizer(main_sizer)
|
||||||
|
|
||||||
|
def OnQuit(self, e):
|
||||||
|
self.Close()
|
||||||
|
|
||||||
|
def on_edit(self, event):
|
||||||
|
print('in on_edit')
|
||||||
|
|
||||||
|
def update_mp3_listing(self, folder_path):
|
||||||
|
print(folder_path)
|
||||||
|
|
||||||
|
# def Onright(self, event):
|
||||||
|
# self.text.AppendText(str(event.GetId())+"\n")
|
||||||
|
|
||||||
|
# def OnCombo(self,event):
|
||||||
|
# self.text.AppendText( self.combo.GetValue()+"\n")
|
||||||
|
|
||||||
|
class ServerFrame(wx.Frame):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__(parent=None, title='Server Dashboard')
|
||||||
|
self.frame = ServerPanel(self)
|
||||||
|
# image = wx.StaticBitmap(self, wx.ID_ANY)
|
||||||
|
# image.SetBitmap(wx.Bitmap('WXPython.png'))
|
||||||
|
self.Show()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app = wx.App(False)
|
||||||
|
frame = ServerFrame()
|
||||||
|
|
||||||
|
app.MainLoop()
|
90
panel.py
90
panel.py
@ -361,92 +361,4 @@ class GetData(wx.Dialog):
|
|||||||
print('in on_edit')
|
print('in on_edit')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
openwindow(list(), dict(), int())
|
openwindow(list(), dict(), int())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""class ServerPanel(wx.Frame):
|
|
||||||
def __init__(self, parent):
|
|
||||||
super().__init__(parent)
|
|
||||||
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
|
||||||
secondary_sizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
||||||
|
|
||||||
menubar = wx.MenuBar()
|
|
||||||
menu = wx.Menu()
|
|
||||||
menubar.Append(menu,"File")
|
|
||||||
self.SetMenuBar(menubar)
|
|
||||||
|
|
||||||
tb = wx.ToolBar( self, -1)
|
|
||||||
self.ToolBar = tb
|
|
||||||
|
|
||||||
|
|
||||||
#tb.AddTool( wx.ID_ANY, '', wx.Bitmap("IPPigeonLogo.png"))
|
|
||||||
tb.AddTool(wx.ID_ANY, '',wx.Bitmap("WXPython_30x30.png"),)
|
|
||||||
tb.AddTool(wx.ID_ANY, '',wx.Bitmap("settings_30x30.png"))
|
|
||||||
|
|
||||||
#tb.Bind(wx.EVT_TOOL, self.Onright)
|
|
||||||
#tb.Bind(wx.EVT_COMBOBOX,self.OnCombo)
|
|
||||||
#self.combo = wx.ComboBox( tb, 555, value = "Times", choices = ["Papyrus","Times","Comic Sans"])
|
|
||||||
|
|
||||||
#tb.AddControl(self.combo )
|
|
||||||
tb.Realize()
|
|
||||||
main_sizer.Add(tb)
|
|
||||||
|
|
||||||
self.Show(True)
|
|
||||||
|
|
||||||
|
|
||||||
self.row_obj_dict = {}
|
|
||||||
self.list_ctrl = wx.ListCtrl(
|
|
||||||
self, size=(-1, 100),
|
|
||||||
style=wx.LC_REPORT | wx.BORDER_SUNKEN
|
|
||||||
)
|
|
||||||
self.SetBackgroundColour(wx.BLACK)
|
|
||||||
self.list_ctrl.InsertColumn(0, 'Server name', width=140)
|
|
||||||
self.list_ctrl.InsertColumn(1, 'Port number', width=140)
|
|
||||||
self.list_ctrl.InsertColumn(2, 'Status', width=200)
|
|
||||||
main_sizer.Add(self.list_ctrl, 0, wx.ALL | wx.EXPAND, 5)
|
|
||||||
start_button = wx.Button(self, label='Start')
|
|
||||||
start_button.SetBackgroundColour((205, 215, 206))
|
|
||||||
start_button.Bind(wx.EVT_BUTTON, self.on_edit)
|
|
||||||
stop_button = wx.Button(self, label='Stop')
|
|
||||||
stop_button.SetBackgroundColour('#F08080')
|
|
||||||
# wx.BORDER(stop_button, wx.BORDER_NONE)
|
|
||||||
stop_button.Bind(wx.EVT_BUTTON, self.on_edit)
|
|
||||||
main_sizer.Add(start_button, 0, wx.CENTER | 100, 5)
|
|
||||||
main_sizer.Add(stop_button, 0, wx.CENTER | 100, 5)
|
|
||||||
# start_button.SetWindowStyleFlag(wx.SIMPLE_BORDER)
|
|
||||||
# stop_button.SetWindowStyleFlag(wx.SIMPLE_BORDER)
|
|
||||||
# wx.StaticBitmap(self, -1, png, (500, 300), (png.GetWidth(), png.GetHeight()))
|
|
||||||
self.SetSizer(main_sizer)
|
|
||||||
|
|
||||||
def OnQuit(self, e):
|
|
||||||
self.Close()
|
|
||||||
|
|
||||||
def on_edit(self, event):
|
|
||||||
print('in on_edit')
|
|
||||||
|
|
||||||
def update_mp3_listing(self, folder_path):
|
|
||||||
print(folder_path)
|
|
||||||
|
|
||||||
# def Onright(self, event):
|
|
||||||
# self.text.AppendText(str(event.GetId())+"\n")
|
|
||||||
|
|
||||||
# def OnCombo(self,event):
|
|
||||||
# self.text.AppendText( self.combo.GetValue()+"\n")
|
|
||||||
|
|
||||||
class ServerFrame(wx.Frame):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__(parent=None, title='Server Dashboard')
|
|
||||||
self.frame = ServerPanel(self)
|
|
||||||
# image = wx.StaticBitmap(self, wx.ID_ANY)
|
|
||||||
# image.SetBitmap(wx.Bitmap('WXPython.png'))
|
|
||||||
self.Show()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app = wx.App(False)
|
|
||||||
frame = ServerFrame()
|
|
||||||
|
|
||||||
app.MainLoop()"""
|
|
BIN
profileIMG.png
Normal file
BIN
profileIMG.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
@ -32,7 +32,7 @@ class TaskBarIcon(wx.adv.TaskBarIcon):
|
|||||||
def CreatePopupMenu(self):
|
def CreatePopupMenu(self):
|
||||||
menu = wx.Menu()
|
menu = wx.Menu()
|
||||||
create_menu_item(menu, 'Control Panel', self.on_open)
|
create_menu_item(menu, 'Control Panel', self.on_open)
|
||||||
create_menu_item(menu, 'Login test', self.on_login)
|
#create_menu_item(menu, 'Login test', self.on_login)
|
||||||
menu.AppendSeparator()
|
menu.AppendSeparator()
|
||||||
create_menu_item(menu, 'Exit', self.on_exit)
|
create_menu_item(menu, 'Exit', self.on_exit)
|
||||||
return menu
|
return menu
|
||||||
|
Reference in New Issue
Block a user