Skip to content

Commit

Permalink
Update1204
Browse files Browse the repository at this point in the history
  • Loading branch information
Puiching-Memory committed Dec 4, 2021
1 parent f562876 commit 82c1259
Show file tree
Hide file tree
Showing 11 changed files with 1,149 additions and 77 deletions.
60 changes: 48 additions & 12 deletions GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,53 +117,53 @@ def __init__( self, parent ):
self.G1.SetFont( wx.Font( 9, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.G1.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G1, 0, 0, 5 )
wSizer_L2.Add( self.G1, 0, wx.RIGHT|wx.LEFT, 2 )

self.G2 = wx.Button( self, wx.ID_ANY, u"数学 3", wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE )
self.G2 = wx.Button( self, wx.ID_ANY, u"数学 4", wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE )
self.G2.SetFont( wx.Font( 9, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.G2.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G2, 0, 0, 5 )
wSizer_L2.Add( self.G2, 0, wx.RIGHT|wx.LEFT, 2 )

self.G3 = wx.Button( self, wx.ID_ANY, u"英语 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G3.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G3, 0, 0, 5 )
wSizer_L2.Add( self.G3, 0, wx.RIGHT|wx.LEFT, 2 )

self.G4 = wx.Button( self, wx.ID_ANY, u"信息 4", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G4.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G4, 0, 0, 5 )
wSizer_L2.Add( self.G4, 0, wx.RIGHT|wx.LEFT, 2 )

self.G5 = wx.Button( self, wx.ID_ANY, u"历史 2", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G5.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G5, 0, 0, 5 )
wSizer_L2.Add( self.G5, 0, wx.RIGHT|wx.LEFT, 2 )

self.G6 = wx.Button( self, wx.ID_ANY, u"地理 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G6.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G6, 0, 0, 5 )
wSizer_L2.Add( self.G6, 0, wx.RIGHT|wx.LEFT, 2 )

self.G7 = wx.Button( self, wx.ID_ANY, u"物理 4", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G7 = wx.Button( self, wx.ID_ANY, u"物理 3", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G7.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G7, 0, 0, 5 )
wSizer_L2.Add( self.G7, 0, wx.RIGHT|wx.LEFT, 2 )

self.G8 = wx.Button( self, wx.ID_ANY, u"化学 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G8.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G8, 0, 0, 5 )
wSizer_L2.Add( self.G8, 0, wx.RIGHT|wx.LEFT, 2 )

self.G9 = wx.Button( self, wx.ID_ANY, u"生物 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G9.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G9, 0, 0, 5 )
wSizer_L2.Add( self.G9, 0, wx.RIGHT|wx.LEFT, 2 )

self.G10 = wx.Button( self, wx.ID_ANY, u"通用 4", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
self.G10.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer_L2.Add( self.G10, 0, 0, 5 )
wSizer_L2.Add( self.G10, 0, wx.RIGHT|wx.LEFT, 2 )


bSizer_main.Add( wSizer_L2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0 )
Expand Down Expand Up @@ -260,6 +260,13 @@ def __init__( self, parent ):

wSizer81.Add( self.Help1, 0, wx.ALL, 5 )

self.TIP1 = wx.Button( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 80,20 ), wx.BORDER_NONE )
self.TIP1.SetFont( wx.Font( 8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.TIP1.SetForegroundColour( wx.Colour( 255, 0, 0 ) )
self.TIP1.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer81.Add( self.TIP1, 0, wx.ALL, 5 )


bSizer3.Add( wSizer81, 0, wx.EXPAND, 5 )

Expand All @@ -271,6 +278,8 @@ def __init__( self, parent ):
wSizer2.Add( self.P_F1, 0, 0, 5 )

self.B_F1 = wx.Button( self, wx.ID_ANY, u"<( ̄︶ ̄)↗[GO!]", wx.DefaultPosition, wx.Size( 160,50 ), wx.BORDER_NONE )
self.B_F1.SetBackgroundColour( wx.Colour( 192, 192, 192 ) )

wSizer2.Add( self.B_F1, 0, 0, 5 )


Expand Down Expand Up @@ -325,6 +334,13 @@ def __init__( self, parent ):

wSizer811.Add( self.Help2, 0, wx.ALL, 5 )

self.TIP2 = wx.Button( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 80,20 ), wx.BORDER_NONE )
self.TIP2.SetFont( wx.Font( 8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.TIP2.SetForegroundColour( wx.Colour( 255, 0, 0 ) )
self.TIP2.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer811.Add( self.TIP2, 0, wx.ALL, 5 )


bSizer31.Add( wSizer811, 0, wx.EXPAND, 5 )

Expand All @@ -336,6 +352,8 @@ def __init__( self, parent ):
wSizer21.Add( self.P_F2, 0, 0, 5 )

self.B_F2 = wx.Button( self, wx.ID_ANY, u"<( ̄︶ ̄)↗[GO!]", wx.DefaultPosition, wx.Size( 160,50 ), wx.BORDER_NONE )
self.B_F2.SetBackgroundColour( wx.Colour( 192, 192, 192 ) )

wSizer21.Add( self.B_F2, 0, 0, 5 )


Expand Down Expand Up @@ -390,6 +408,13 @@ def __init__( self, parent ):

wSizer812.Add( self.Help3, 0, wx.ALL, 5 )

self.TIP3 = wx.Button( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 80,20 ), wx.BORDER_NONE )
self.TIP3.SetFont( wx.Font( 8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.TIP3.SetForegroundColour( wx.Colour( 255, 0, 0 ) )
self.TIP3.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer812.Add( self.TIP3, 0, wx.ALL, 5 )


bSizer32.Add( wSizer812, 0, wx.EXPAND, 5 )

Expand All @@ -401,6 +426,8 @@ def __init__( self, parent ):
wSizer22.Add( self.P_F3, 0, 0, 5 )

self.B_F3 = wx.Button( self, wx.ID_ANY, u"<( ̄︶ ̄)↗[GO!]", wx.DefaultPosition, wx.Size( 160,50 ), wx.BORDER_NONE )
self.B_F3.SetBackgroundColour( wx.Colour( 192, 192, 192 ) )

wSizer22.Add( self.B_F3, 0, 0, 5 )

self.Tip3 = wx.Button( self, wx.ID_ANY, u"Tip3", wx.DefaultPosition, wx.Size( 200,40 ), wx.BORDER_NONE|wx.BU_LEFT|wx.BU_TOP )
Expand Down Expand Up @@ -455,6 +482,13 @@ def __init__( self, parent ):

wSizer813.Add( self.Help4, 0, wx.ALL, 5 )

self.TIP4 = wx.Button( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 80,20 ), wx.BORDER_NONE )
self.TIP4.SetFont( wx.Font( 8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.TIP4.SetForegroundColour( wx.Colour( 255, 0, 0 ) )
self.TIP4.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer813.Add( self.TIP4, 0, wx.ALL, 5 )


bSizer33.Add( wSizer813, 0, wx.EXPAND, 5 )

Expand All @@ -466,6 +500,8 @@ def __init__( self, parent ):
wSizer23.Add( self.P_F4, 0, 0, 5 )

self.B_F4 = wx.Button( self, wx.ID_ANY, u"<( ̄︶ ̄)↗[GO!]", wx.DefaultPosition, wx.Size( 160,50 ), wx.BORDER_NONE )
self.B_F4.SetBackgroundColour( wx.Colour( 192, 192, 192 ) )

wSizer23.Add( self.B_F4, 0, 0, 5 )

self.Tip4 = wx.Button( self, wx.ID_ANY, u"Tip4", wx.DefaultPosition, wx.Size( 200,40 ), wx.BORDER_NONE|wx.BU_LEFT|wx.BU_TOP )
Expand Down
8 changes: 6 additions & 2 deletions GUI_College.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
Expand Down Expand Up @@ -90,14 +90,18 @@ def __init__( self, parent ):
self.Centre( wx.BOTH )

# Connect Events
self.Bind( wx.EVT_CLOSE, self.Close )
self.BOX.Bind( wx.EVT_LISTBOX, self.Choise )
self.BOX.Bind( wx.EVT_LISTBOX_DCLICK, self.Choise )

def __del__( self ):
pass


# Virtual event handlers, overide them in your derived class
# Virtual event handlers, override them in your derived class
def Close( self, event ):
event.Skip()

def Choise( self, event ):
event.Skip()

Expand Down
25 changes: 23 additions & 2 deletions GUI_SSC.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__( self, parent ):

wSizer4 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )

self.B_Title = wx.Button( self, wx.ID_ANY, u"RBS_SSC #021.10.30 条形码登记系统", wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE )
self.B_Title = wx.Button( self, wx.ID_ANY, u"RBS_SSC #021.11.14 条形码登记系统", wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE )
self.B_Title.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )

wSizer4.Add( self.B_Title, 0, wx.ALL, 5 )
Expand Down Expand Up @@ -85,14 +85,21 @@ def __init__( self, parent ):
self.B_Replace = wx.Button( self, wx.ID_ANY, u"复位", wx.DefaultPosition, wx.DefaultSize, 0 )
wSizer6.Add( self.B_Replace, 0, wx.ALL, 5 )

Kind_choiceChoices = [ u"A", u"B", u"C" ]
Kind_choiceChoices = [ u"A", u"B", u"C", u"D", u"E", u"F" ]
self.Kind_choice = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, Kind_choiceChoices, 0 )
self.Kind_choice.SetSelection( 0 )
wSizer6.Add( self.Kind_choice, 0, wx.ALL, 5 )

self.B_Export = wx.Button( self, wx.ID_ANY, u"导出", wx.DefaultPosition, wx.DefaultSize, 0 )
self.B_Export.Enable( False )

wSizer6.Add( self.B_Export, 0, wx.ALL, 5 )

ClassChoices = [ u"Class8", u"Class5" ]
self.Class = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, ClassChoices, 0 )
self.Class.SetSelection( 0 )
wSizer6.Add( self.Class, 0, wx.ALL, 5 )


bSizer2.Add( wSizer6, 0, 0, 5 )

Expand All @@ -105,8 +112,14 @@ def __init__( self, parent ):
# Connect Events
self.Bind( wx.EVT_CLOSE, self.Close )
self.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.B_Title.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.GRID.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.T_key_list.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.B_Replace.Bind( wx.EVT_BUTTON, self.Replace )
self.B_Replace.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.B_Export.Bind( wx.EVT_BUTTON, self.Export )
self.Class.Bind( wx.EVT_CHOICE, self.Change_Class )
self.Class.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )

def __del__( self ):
pass
Expand All @@ -119,10 +132,18 @@ def Close( self, event ):
def Hot_Key_Down( self, event ):
event.Skip()




def Replace( self, event ):
event.Skip()


def Export( self, event ):
event.Skip()

def Change_Class( self, event ):
event.Skip()



18 changes: 11 additions & 7 deletions M_BingWallPaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ def __init__(self, parent):
# 定义主函数
GUI_BingWallPaper.Main.__init__(self, parent)

for i in range(0,4):
print((i))
picture_url_1 = "https://bing.ioliu.cn/v1/rand"
res = requests.get(picture_url_1, timeout=3600)
network = res.status_code
with open("./Cache/BingWallPaper_1.jpg", "wb") as f:
f.write(res.content)
try:
for i in range(0,4):
print((i))
picture_url_1 = "https://bing.ioliu.cn/v1/rand"
res = requests.get(picture_url_1, timeout=3600)
network = res.status_code
with open("./Cache/BingWallPaper_1.jpg", "wb") as f:
f.write(res.content)
except:
print('Net ERROR')


def Close(self, event):
try:
Expand Down
8 changes: 8 additions & 0 deletions L_College.py → M_College.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@ def Choise(self, event):
self.X_score.SetLabel(str('学科水平得分:' + str(X_score)))
self.Z_score.SetLabel(str('办学资源得分:' + str(Z_score)))

def Close(self, event):
try:
if app.GetAppName() != '_core.cp38-win_amd64':
self.Destroy()
except:
self.Hide()

##############################
# 主函数
##############################


def main():
global app
app = wx.App(False)
frame = CalcFrame(None)
frame.Show(True)
Expand Down
15 changes: 9 additions & 6 deletions M_History.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ class CalcFrame(GUI_History.Main):
def __init__(self, parent):
# 定义主函数
GUI_History.Main.__init__(self, parent)
url = "https://www.ipip5.com/today/api.php?type=txt"
res = requests.get(url, timeout=3600)
with open("./Cache/History.txt", "wb") as f:
f.write(res.content)
try:
url = "https://www.ipip5.com/today/api.php?type=txt"
res = requests.get(url, timeout=3600)
with open("./Cache/History.txt", "wb") as f:
f.write(res.content)

file = open('./Cache/History.txt', 'r', encoding='utf-8')
self.Info.SetValue(file.read())
file = open('./Cache/History.txt', 'r', encoding='utf-8')
self.Info.SetValue(file.read())
except:
self.Info.SetValue('Net ERROR')

def Close(self, event):
try:
Expand Down
1 change: 0 additions & 1 deletion M_Pinyin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def Close(self, event):
except:
self.Hide()


##############################
# 主函数
##############################
Expand Down
13 changes: 13 additions & 0 deletions M_SSC.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ def Export(self, event):
workbook.save(get_desktop() + '\Export.xls')
print('save finish')


def Change_Class(self, event):
if self.Class.GetSelection() == 0:
self.GRID.ClearGrid()
for i in range(0,50):
i_a = 801 + i
self.GRID.SetRowLabelValue(i, '0' + str(i_a))
elif self.Class.GetSelection() == 1:
self.GRID.ClearGrid()
for i in range(0,50):
i_a = 501 + i
self.GRID.SetRowLabelValue(i, '0' + str(i_a))

def Close(self, event):
try:
if app.GetAppName() != '_core.cp38-win_amd64':
Expand Down
Loading

0 comments on commit 82c1259

Please sign in to comment.