forked from meerk40t/gui-files-meerk40t
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meerk40t-shutdown.py
73 lines (58 loc) · 2.53 KB
/
meerk40t-shutdown.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.3 on Sun Feb 2 19:24:16 2020
#
import wx
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class Shutdown(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: Shutdown.__init__
kwds["style"] = kwds.get("style", 0) | wx.CAPTION | wx.CLIP_CHILDREN | wx.FRAME_TOOL_WINDOW | wx.RESIZE_BORDER | wx.STAY_ON_TOP
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((413, 573))
self.text_shutdown = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
self.button_stop = wx.BitmapButton(self, wx.ID_ANY, wx.Bitmap("C:\\Users\\Tat\\PycharmProjects\\meerk40t\\gui\\icons\\icons8-stop-sign-50.png", wx.BITMAP_TYPE_ANY))
self.button_reload = wx.BitmapButton(self, wx.ID_ANY, wx.Bitmap("C:\\Users\\Tat\\PycharmProjects\\meerk40t\\gui\\icons\\meerk40t.jpg", wx.BITMAP_TYPE_ANY))
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.on_button_stop, self.button_stop)
self.Bind(wx.EVT_BUTTON, self.on_button_reload, self.button_reload)
# end wxGlade
def __set_properties(self):
# begin wxGlade: Shutdown.__set_properties
self.SetTitle("Shutdown")
self.button_stop.SetMinSize((108, 108))
self.button_reload.SetSize(self.button_reload.GetBestSize())
# end wxGlade
def __do_layout(self):
# begin wxGlade: Shutdown.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
sizer_1.Add(self.text_shutdown, 5, wx.EXPAND, 0)
sizer_2.Add(self.button_stop, 0, 0, 0)
sizer_2.Add(self.button_reload, 0, 0, 0)
sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
self.Layout()
# end wxGlade
def on_button_stop(self, event): # wxGlade: Shutdown.<event_handler>
print("Event handler 'on_button_stop' not implemented!")
event.Skip()
def on_button_reload(self, event): # wxGlade: Shutdown.<event_handler>
print("Event handler 'on_button_reload' not implemented!")
event.Skip()
# end of class Shutdown
class MyApp(wx.App):
def OnInit(self):
self.Shutdown = Shutdown(None, wx.ID_ANY, "")
self.SetTopWindow(self.Shutdown)
self.Shutdown.Show()
return True
# end of class MyApp
if __name__ == "__main__":
app = MyApp(0)
app.MainLoop()