|
|
@ -40,7 +40,7 @@ class OtherFrame(wx.Frame):
|
|
|
|
Class used for creating frames other than the main one
|
|
|
|
Class used for creating frames other than the main one
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
def __init__(self):
|
|
|
|
def __init__(self):
|
|
|
|
wx.Frame.__init__(self, None, -1, 'Server Panel', size=(1000, 700))
|
|
|
|
wx.Frame.__init__(self, None, -1, 'Server Panel', size=(1000, 620))
|
|
|
|
panel = ServerPanel(self)
|
|
|
|
panel = ServerPanel(self)
|
|
|
|
self.SetIcon(wx.Icon(find_data_file("icon.ico"), wx.BITMAP_TYPE_ICO))
|
|
|
|
self.SetIcon(wx.Icon(find_data_file("icon.ico"), wx.BITMAP_TYPE_ICO))
|
|
|
|
|
|
|
|
|
|
|
@ -154,6 +154,12 @@ class ServerPanel(wx.Panel):
|
|
|
|
#tb.AddTool(wx.ID_ANY, '',wx.Bitmap(find_data_file("WXPython_30x30.png")),)
|
|
|
|
#tb.AddTool(wx.ID_ANY, '',wx.Bitmap(find_data_file("WXPython_30x30.png")),)
|
|
|
|
#tb.AddTool(wx.ID_ANY, '',wx.Bitmap(find_data_file("settings_30x30.png")))
|
|
|
|
#tb.AddTool(wx.ID_ANY, '',wx.Bitmap(find_data_file("settings_30x30.png")))
|
|
|
|
#tb.Realize()
|
|
|
|
#tb.Realize()
|
|
|
|
|
|
|
|
if settings["running"] == True:
|
|
|
|
|
|
|
|
txt = "Status: Running (" + str(settings["config"]["core"]["level"]) + ")"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
txt = "Status: Not running"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.statustext = wx.StaticText(self, label=txt) # pos=(20,20))
|
|
|
|
#self.main_sizer.Add(tb)
|
|
|
|
#self.main_sizer.Add(tb)
|
|
|
|
#main_sizer.SetBackgroundColour((44, 51, 51))
|
|
|
|
#main_sizer.SetBackgroundColour((44, 51, 51))
|
|
|
|
# self.pnl1.SetBackgroundColour(wx.BLACK)
|
|
|
|
# self.pnl1.SetBackgroundColour(wx.BLACK)
|
|
|
@ -174,6 +180,7 @@ class ServerPanel(wx.Panel):
|
|
|
|
secondary_frame_button.Bind(wx.EVT_BUTTON, self.on_window)
|
|
|
|
secondary_frame_button.Bind(wx.EVT_BUTTON, self.on_window)
|
|
|
|
# wx.BORDER(stop_button, wx.BORDER_NONE)
|
|
|
|
# wx.BORDER(stop_button, wx.BORDER_NONE)
|
|
|
|
stop_button.Bind(wx.EVT_BUTTON, self.on_stop)
|
|
|
|
stop_button.Bind(wx.EVT_BUTTON, self.on_stop)
|
|
|
|
|
|
|
|
self.main_sizer.Add(self.statustext, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
|
self.main_sizer.Add(start_button, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
|
self.main_sizer.Add(start_button, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
|
self.main_sizer.Add(stop_button, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
|
self.main_sizer.Add(stop_button, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
|
self.main_sizer.Add(secondary_frame_button, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
|
self.main_sizer.Add(secondary_frame_button, 0, wx.CENTER | wx.ALL | 100, 5)
|
|
|
@ -185,6 +192,11 @@ class ServerPanel(wx.Panel):
|
|
|
|
|
|
|
|
|
|
|
|
def updatedata(self):
|
|
|
|
def updatedata(self):
|
|
|
|
global settings
|
|
|
|
global settings
|
|
|
|
|
|
|
|
if settings["running"] == True:
|
|
|
|
|
|
|
|
txt = "Status: Running (" + str(settings["config"]["core"]["level"]) + ")"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
txt = "Status: Not running"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if settings["newdata"] == True:
|
|
|
|
if settings["newdata"] == True:
|
|
|
|
settings["newdata"] = False
|
|
|
|
settings["newdata"] = False
|
|
|
@ -220,6 +232,7 @@ class ServerPanel(wx.Panel):
|
|
|
|
|
|
|
|
|
|
|
|
#fprint(i, j, TEST_FILE.iloc[i, j])
|
|
|
|
#fprint(i, j, TEST_FILE.iloc[i, j])
|
|
|
|
#self.SetSizer(self.main_sizer)
|
|
|
|
#self.SetSizer(self.main_sizer)
|
|
|
|
|
|
|
|
self.statustext.SetLabel(txt)
|
|
|
|
wx.CallLater(1000, self.updatedata)
|
|
|
|
wx.CallLater(1000, self.updatedata)
|
|
|
|
|
|
|
|
|
|
|
|
def on_start(self, event):
|
|
|
|
def on_start(self, event):
|
|
|
|