style: modify code style

This commit is contained in:
2023-11-29 16:28:59 +08:00
parent 217c8c1614
commit ea5b6c7b85
5 changed files with 391 additions and 144 deletions

View File

@@ -1,18 +1,25 @@
import wx
import wx.xrc
import wx # pylint: disable=e0401 # type: ignore
import wx.xrc # pylint: disable=e0401 # type: ignore
class MyFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"安全多方服务器平台", pos=wx.DefaultPosition,
size=wx.Size(444, 749),
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
wx.Frame.__init__(
self,
parent,
id=wx.ID_ANY,
title="安全多方服务器平台",
pos=wx.DefaultPosition,
size=wx.Size(444, 749),
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
)
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
self.SetFont(wx.Font(5, 70, 90, 90, False, "宋体"))
self.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT))
self.SetBackgroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)
)
fgSizer1 = wx.FlexGridSizer(0, 2, 0, 0)
fgSizer1.SetFlexibleDirection(wx.BOTH)
@@ -20,51 +27,81 @@ class MyFrame(wx.Frame):
bSizer11 = wx.BoxSizer(wx.VERTICAL)
self.m_bitmap11 = wx.StaticBitmap(self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size(70, 30), 0)
self.m_bitmap11 = wx.StaticBitmap(
self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size(70, 30), 0
)
bSizer11.Add(self.m_bitmap11, 0, wx.ALL, 5)
self.m_staticline211 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL)
self.m_staticline211.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline211 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL
)
self.m_staticline211.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
self.m_staticline211.SetMaxSize(wx.Size(80, -1))
bSizer11.Add(self.m_staticline211, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticText1 = wx.StaticText(self, wx.ID_ANY, u"接收记录", wx.DefaultPosition, wx.Size(-1, 30), 0)
self.m_staticText1 = wx.StaticText(
self, wx.ID_ANY, "接收记录", wx.DefaultPosition, wx.Size(-1, 30), 0
)
self.m_staticText1.Wrap(-1)
self.m_staticText1.SetFont(wx.Font(11, 70, 90, 90, False, "宋体"))
self.m_staticText1.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_staticText1.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer11.Add(self.m_staticText1, 0, wx.ALL, 5)
self.m_bitmap1 = wx.StaticBitmap(self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size(70, 111), 0)
self.m_bitmap1 = wx.StaticBitmap(
self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size(70, 111), 0
)
bSizer11.Add(self.m_bitmap1, 0, wx.ALL, 5)
self.m_staticline21 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL)
self.m_staticline21.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline21 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL
)
self.m_staticline21.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
self.m_staticline21.SetMaxSize(wx.Size(80, -1))
bSizer11.Add(self.m_staticline21, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticText11 = wx.StaticText(self, wx.ID_ANY, u"发送记录", wx.DefaultPosition, wx.Size(-1, 30), 0)
self.m_staticText11 = wx.StaticText(
self, wx.ID_ANY, "发送记录", wx.DefaultPosition, wx.Size(-1, 30), 0
)
self.m_staticText11.Wrap(-1)
self.m_staticText11.SetFont(wx.Font(11, 70, 90, 90, False, "宋体"))
self.m_staticText11.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_staticText11.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer11.Add(self.m_staticText11, 0, wx.ALL, 5)
self.m_bitmap12 = wx.StaticBitmap(self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size(70, 111), 0)
self.m_bitmap12 = wx.StaticBitmap(
self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size(70, 111), 0
)
bSizer11.Add(self.m_bitmap12, 0, wx.ALL, 5)
self.m_staticline212 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL)
self.m_staticline212.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline212 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL
)
self.m_staticline212.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
self.m_staticline212.SetMaxSize(wx.Size(80, -1))
bSizer11.Add(self.m_staticline212, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticText111 = wx.StaticText(self, wx.ID_ANY, u"当前状态", wx.DefaultPosition, wx.Size(-1, 30), 0)
self.m_staticText111 = wx.StaticText(
self, wx.ID_ANY, "当前状态", wx.DefaultPosition, wx.Size(-1, 30), 0
)
self.m_staticText111.Wrap(-1)
self.m_staticText111.SetFont(wx.Font(11, 70, 90, 90, False, "宋体"))
self.m_staticText111.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_staticText111.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer11.Add(self.m_staticText111, 0, wx.ALL, 5)
@@ -74,48 +111,80 @@ class MyFrame(wx.Frame):
bSizer2 = wx.BoxSizer(wx.VERTICAL)
self.m_staticText = wx.StaticText(self, wx.ID_ANY, u"安全多方平台服务器", wx.DefaultPosition, wx.Size(-1, 30), 0)
self.m_staticText = wx.StaticText(
self, wx.ID_ANY, "安全多方平台服务器", wx.DefaultPosition, wx.Size(-1, 30), 0
)
self.m_staticText.Wrap(-1)
self.m_staticText.SetFont(wx.Font(16, 70, 90, 92, False, "宋体"))
self.m_staticText.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_staticText.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer2.Add(self.m_staticText, 0, wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(1, 2), wx.LI_HORIZONTAL)
self.m_staticline1.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline1 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(1, 2), wx.LI_HORIZONTAL
)
self.m_staticline1.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
bSizer2.Add(self.m_staticline1, 0, wx.EXPAND | wx.ALL, 5)
self.m_listCtrl1 = wx.ListCtrl(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(360, 150), wx.LC_REPORT)
self.m_listCtrl1 = wx.ListCtrl(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(360, 150), wx.LC_REPORT
)
self.m_listCtrl1.SetFont(wx.Font(9, 70, 90, 90, False, "宋体"))
self.m_listCtrl1.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_listCtrl1.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer2.Add(self.m_listCtrl1, 0, wx.ALL, 5)
self.m_staticline2 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL)
self.m_staticline2.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline2 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL
)
self.m_staticline2.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
bSizer2.Add(self.m_staticline2, 0, wx.EXPAND | wx.ALL, 5)
self.m_listCtrl2 = wx.ListCtrl(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(360, 150), wx.LC_REPORT)
self.m_listCtrl2 = wx.ListCtrl(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(360, 150), wx.LC_REPORT
)
self.m_listCtrl2.SetFont(wx.Font(9, 70, 90, 90, False, "宋体"))
self.m_listCtrl2.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_listCtrl2.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer2.Add(self.m_listCtrl2, 0, wx.ALL, 5)
self.m_staticline22 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL)
self.m_staticline22.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline22 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL
)
self.m_staticline22.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
bSizer2.Add(self.m_staticline22, 0, wx.EXPAND | wx.ALL, 5)
self.m_listCtrl3 = wx.ListCtrl(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(360, 150), wx.LC_REPORT)
self.m_listCtrl3 = wx.ListCtrl(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(360, 150), wx.LC_REPORT
)
self.m_listCtrl3.SetFont(wx.Font(9, 70, 90, 90, False, "宋体"))
self.m_listCtrl3.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_listCtrl3.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer2.Add(self.m_listCtrl3, 0, wx.ALL, 5)
self.m_staticline221 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL)
self.m_staticline221.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION))
self.m_staticline221 = wx.StaticLine(
self, wx.ID_ANY, wx.DefaultPosition, wx.Size(-1, 2), wx.LI_HORIZONTAL
)
self.m_staticline221.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)
)
bSizer2.Add(self.m_staticline221, 0, wx.EXPAND | wx.ALL, 5)
@@ -123,9 +192,13 @@ class MyFrame(wx.Frame):
bSizer102 = wx.BoxSizer(wx.HORIZONTAL)
self.m_button31 = wx.Button(self, wx.ID_ANY, u"显示本地公钥", wx.DefaultPosition, wx.Size(300, 30), 0)
self.m_button31 = wx.Button(
self, wx.ID_ANY, "显示本地公钥", wx.DefaultPosition, wx.Size(300, 30), 0
)
self.m_button31.SetFont(wx.Font(11, 70, 90, 90, False, wx.EmptyString))
self.m_button31.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_button31.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer102.Add(self.m_button31, 0, wx.ALIGN_CENTER | wx.ALL, 5)
@@ -133,9 +206,13 @@ class MyFrame(wx.Frame):
bSizer1012 = wx.BoxSizer(wx.HORIZONTAL)
self.m_button41 = wx.Button(self, wx.ID_ANY, u"显示本地私钥", wx.DefaultPosition, wx.Size(300, 30), 0)
self.m_button41 = wx.Button(
self, wx.ID_ANY, "显示本地私钥", wx.DefaultPosition, wx.Size(300, 30), 0
)
self.m_button41.SetFont(wx.Font(11, 70, 90, 90, False, wx.EmptyString))
self.m_button41.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_button41.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer1012.Add(self.m_button41, 0, wx.ALIGN_CENTER | wx.ALL, 5)
@@ -143,9 +220,13 @@ class MyFrame(wx.Frame):
bSizer10111 = wx.BoxSizer(wx.HORIZONTAL)
self.m_button51 = wx.Button(self, wx.ID_ANY, u"打印本地证书", wx.DefaultPosition, wx.Size(300, 30), 0)
self.m_button51 = wx.Button(
self, wx.ID_ANY, "打印本地证书", wx.DefaultPosition, wx.Size(300, 30), 0
)
self.m_button51.SetFont(wx.Font(11, 70, 90, 90, False, wx.EmptyString))
self.m_button51.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
self.m_button51.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
)
bSizer10111.Add(self.m_button51, 0, wx.ALIGN_CENTER | wx.ALL, 5)