import wx import wx.xrc 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) 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)) fgSizer1 = wx.FlexGridSizer(0, 2, 0, 0) fgSizer1.SetFlexibleDirection(wx.BOTH) fgSizer1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED) bSizer11 = wx.BoxSizer(wx.VERTICAL) 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.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.Wrap(-1) self.m_staticText1.SetFont(wx.Font(11, 70, 90, 90, False, "宋体")) 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) 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.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.Wrap(-1) self.m_staticText11.SetFont(wx.Font(11, 70, 90, 90, False, "宋体")) 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) 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.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.Wrap(-1) self.m_staticText111.SetFont(wx.Font(11, 70, 90, 90, False, "宋体")) self.m_staticText111.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)) bSizer11.Add(self.m_staticText111, 0, wx.ALL, 5) fgSizer1.Add(bSizer11, 1, wx.EXPAND, 5) bSizer1 = wx.BoxSizer(wx.HORIZONTAL) 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.Wrap(-1) self.m_staticText.SetFont(wx.Font(16, 70, 90, 92, False, "宋体")) 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)) 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.SetFont(wx.Font(9, 70, 90, 90, False, "宋体")) 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)) 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.SetFont(wx.Font(9, 70, 90, 90, False, "宋体")) 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)) 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.SetFont(wx.Font(9, 70, 90, 90, False, "宋体")) 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)) bSizer2.Add(self.m_staticline221, 0, wx.EXPAND | wx.ALL, 5) bSizer12 = wx.BoxSizer(wx.VERTICAL) 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.SetFont(wx.Font(11, 70, 90, 90, False, wx.EmptyString)) self.m_button31.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)) bSizer102.Add(self.m_button31, 0, wx.ALIGN_CENTER | wx.ALL, 5) bSizer12.Add(bSizer102, 1, wx.EXPAND, 5) 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.SetFont(wx.Font(11, 70, 90, 90, False, wx.EmptyString)) self.m_button41.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)) bSizer1012.Add(self.m_button41, 0, wx.ALIGN_CENTER | wx.ALL, 5) bSizer12.Add(bSizer1012, 1, wx.EXPAND, 5) 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.SetFont(wx.Font(11, 70, 90, 90, False, wx.EmptyString)) self.m_button51.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)) bSizer10111.Add(self.m_button51, 0, wx.ALIGN_CENTER | wx.ALL, 5) bSizer12.Add(bSizer10111, 1, wx.EXPAND, 5) bSizer2.Add(bSizer12, 1, wx.EXPAND, 5) bSizer1.Add(bSizer2, 1, wx.EXPAND, 5) fgSizer1.Add(bSizer1, 1, wx.EXPAND, 5) self.SetSizer(fgSizer1) self.Layout() self.Centre(wx.BOTH) # Connect Events self.m_button31.Bind(wx.EVT_BUTTON, self.print_public_key) self.m_button41.Bind(wx.EVT_BUTTON, self.print_private_key) self.m_button51.Bind(wx.EVT_BUTTON, self.print_certificate) def __del__(self): pass # Virtual event handlers, override them in your derived class def print_public_key(self, event): event.Skip() def print_private_key(self, event): event.Skip() def print_certificate(self, event): event.Skip()