Esempio n. 1
0
    def run_player(self, event):

        box = wx.TextEntryDialog(None, "Enter the name of the Player", "Cricket")
        box.SetBackgroundColour('light grey')
        if box.ShowModal() == wx.ID_OK:
            player = box.GetValue()
            disp=SQL.showall_db(arg1="pname",arg2="%"+player+"%",arg3="check")
            text=wx.TextCtrl(self,-1,disp,size=(675,550),pos=(350,100))
            text.SetBackgroundColour('light grey')

            font = wx.Font(10, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
            text.SetFont(font)

            checks = ['Country','Born','Current Age','Major Teams','Profile', 'Images', 'All Info']
            modal = wx.SingleChoiceDialog(None, "", "CHOICES", checks)
            if modal.ShowModal() == wx.ID_OK:
                choice= modal.GetStringSelection()
                disp=SQL.showall_db(arg1="pname",arg2="%"+player+"%",arg3=choice)
                text=wx.TextCtrl(self,-1,disp,size=(675,550),pos=(350,100))
                text.SetBackgroundColour('light grey')
                font = wx.Font(10, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
                text.SetFont(font)

        else:

            text=wx.TextCtrl(self,-1,"You have cancelled the Application",size=(675,550),pos=(350,100))
            text.SetBackgroundColour('light grey')
            font = wx.Font(10, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
            text.SetFont(font)
Esempio n. 2
0
    def run_bowlers(self, event):
        box = wx.TextEntryDialog(None, "Enter Bowling Style", "Cricket")
        box.SetBackgroundColour('light grey')
        if box.ShowModal() == wx.ID_OK:
            bowlers = box.GetValue()
            disp=SQL.showall_db(arg1="pbowl",arg2="%"+bowlers+"%",arg3="check")
            text=wx.TextCtrl(self,-1,disp,size=(675,550),pos=(350,100))
            text.SetBackgroundColour('light grey')
            font = wx.Font(10, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
            text.SetFont(font)

            checks = ['Player Name','Country','All Info']
            modal = wx.SingleChoiceDialog(None, "", "CHOICES", checks)
            if modal.ShowModal() == wx.ID_OK:
                choice= modal.GetStringSelection()
                disp=SQL.showall_db(arg1="pbowl",arg2="%"+bowlers+"%",arg3=choice)
                text=wx.TextCtrl(self,-1,disp,size=(675,550),pos=(350,100))
                text.SetBackgroundColour('light grey')
                font = wx.Font(10, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
                text.SetFont(font)

            else:
                text=wx.TextCtrl(self,-1,"You have cancelled the Application",size=(675,550),pos=(350,100))
                text.SetBackgroundColour('light grey')
                font = wx.Font(10, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
                text.SetFont(font)