Beispiel #1
0
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        lb2 = tk.Label(self, text="Nova Senha ")
        lb2.place(x=10, y=50)

        senha = tk.Entry(self, width=30)
        senha.place(x=10, y=70)

        lb3 = tk.Label(self, text="Confirmar senha")
        lb3.place(x=10, y=100)

        confsenha = tk.Entry(self, width=30)
        confsenha.place(x=10, y=120)

        btentrar2 = tk.Button(
            self,
            text="confirmar",
            command=lambda: controller.show_frame(informacoes))
        btentrar2.place(x=10, y=200)

        btgravasenha2 = tk.Button(
            self,
            text="Voltar",
            command=lambda: controller.show_frame(StartPage))
        btgravasenha2.place(x=160, y=200)
Beispiel #2
0
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)
        label = tk.Label(self, text="Game Maniacos", font=LARGE_FONT)
        label.pack(pady=10, padx=10)

        label1 = tk.Label(self, text="SOBRE", font=LARGE_FONT)
        label1.pack()

        label2 = tk.Label(self, text="Objetivo: Criar 1 programa que")
        label2.pack()

        label3 = tk.Label(self, text="consiga facilitar a busca")
        label3.pack()

        label4 = tk.Label(self, text="por informações relacionadas a jogos")
        label4.pack()

        label5 = tk.Label(self)
        label5.pack(pady=5)

        label6 = tk.Label(self, text="Autor: Gutembergues Gomes de Araujo")
        label6.pack()

        label7 = tk.Label(self, text="RA:2840481623018")
        label7.pack()

        button1 = tk.Button(self,
                            text="Voltar",
                            command=lambda: controller.show_frame(StartPage))
        button1.pack(pady=10)
Beispiel #3
0
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        prodlist = [
            'Sony', 'Nintendo', 'Sega', 'MicroSoft', 'Naught Dog', 'Capcom',
            'Squase Enix', 'Konami'
        ]
        consolist = [
            'Nintendo', 'Nintendo 64', 'PlayStation', 'PlayStation 2',
            'PlayStation 3', 'PlayStation 4', 'Xbox', 'Xbox 360', 'Xbox One',
            'PC'
        ]

        label = tk.Label(self, text="Produtora")
        label.place(x=10, y=10)

        spinbox = tk.Spinbox(self, fg="blue", font=12, values=prodlist)
        spinbox.place(x=10, y=30)

        label1 = tk.Label(self, text="Console")
        label1.place(x=10, y=50)

        spinbox1 = tk.Spinbox(self, fg="blue", font=12, values=consolist)
        spinbox1.place(x=10, y=70)

        label3 = tk.Label(self, text="Tipo de Pesquisa")
        label3.place(x=10, y=110)

        #radio= tk.Radiobutton(self, text="Simples",value = 1 ,variable = 'gr1').place(x=10,y=130)
        #radio1= tk.Radiobutton(self, text="Completa",value = 2 ,variable = 'gr1').place(x=80,y=130)

        CheckVar1 = tk.IntVar()
        C1 = tk.Checkbutton(self,
                            text="Mostrar Todos os Consoles",
                            variable=CheckVar1,
                            onvalue=1,
                            offvalue=0)

        C1.place(x=10, y=160)

        button1 = tk.Button(self,
                            text="Voltar",
                            command=lambda: controller.show_frame(StartPage))
        button1.place(x=10, y=200)

        button2 = tk.Button(self,
                            text="Procurar",
                            command=lambda: controller.show_frame(StartPage))
        button2.place(x=70, y=200)
Beispiel #4
0
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        prodlist = [
            'Sony', 'Nintendo', 'Sega', 'MicroSoft', 'Naught Dog', 'Capcom',
            'Squase Enix', 'Konami'
        ]
        aceslist = [
            'Guitarra', 'Tambor', 'Volante', 'PSMove', 'Kinect', 'Luva'
        ]

        label = tk.Label(self, text="Produtora")
        label.place(x=10, y=10)

        spinbox = tk.Spinbox(self, fg="blue", font=12, values=prodlist)
        spinbox.place(x=10, y=30)

        label1 = tk.Label(self, text="Produtora")
        label1.place(x=10, y=50)

        spinbox1 = tk.Spinbox(self, fg="blue", font=12, values=aceslist)
        spinbox1.place(x=10, y=70)

        label3 = tk.Label(self, text="Tipo de Pesquisa")
        label3.place(x=10, y=100)

        #radio= tk.Radiobutton(self, text="Simples",value = 1 ,variable = 'gr1').place(x=10,y=120)
        #radio1= tk.Radiobutton(self, text="Completa", value = 0 ,variable = 'gr1').place(x=80,y=120)

        CheckVar1 = tk.IntVar()
        C1 = tk.Checkbutton(self,
                            text="Mostrar Todos os Consoles",
                            variable=CheckVar1,
                            onvalue=1,
                            offvalue=0)
        C1.place(x=10, y=150)

        button1 = tk.Button(self,
                            text="Voltar",
                            command=lambda: controller.show_frame(StartPage))
        button1.place(x=10, y=180)

        button2 = tk.Button(self,
                            text="Procurar",
                            command=lambda: controller.show_frame(StartPage))
        button2.place(x=70, y=180)
Beispiel #5
0
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        prodlist=['Sony','Nintendo','Sega','MicroSoft','Naught Dog','Capcom','Squase Enix', 'Konami']
        consolist=['Nintendo', 'Nintendo 64', 'PlayStation', 'PlayStation 2', 'PlayStation 3','PlayStation 4',
                        'Xbox','Xbox 360', 'Xbox One', 'PC']
        joglist=['Mario', 'Sonic', 'Zelda','The King of Fighters', 'Dnkey Kong', 'Devil May Cry','The Last of Us',
                        'The Whitcher', 'Uncharted', 'Mortal Kombat', 'Whatch Dogs']

        label = tk.Label(self, text="Produtora")
        label.place(x=10,y=10)

        spinbox = tk.Spinbox (self, fg="blue", font=12, values=prodlist)
        spinbox.place(x=10,y=30)


        label1 = tk.Label(self, text="Console")
        label1.place(x=10,y=50)

        spinbox1 = tk.Spinbox (self, fg="blue", font=12, values=consolist)
        spinbox1.place(x=10,y=70)


        label2 = tk.Label(self, text="Jogos")
        label2.place(x=10,y=90)

        spinbox2 = tk.Spinbox (self, fg="blue", font=12, values=joglist)
        spinbox2.place(x=10,y=110)


        label3 = tk.Label(self, text="Tipo de Pesquisa")
        label3.place(x=10,y=150)

        #radio = tk.Radiobutton(self, text="Simples",value = 1 ,variable = 'gr1').place(x=10,y=170)
        #radio1 = tk.Radiobutton(self, text="Completa",value = 2 ,variable = 'gr1').place(x=80,y=170)


        button1 = tk.Button(self, text="Voltar",
                            command=lambda: controller.show_frame(StartPage))
        button1.place(x=10,y=200)

        button2 = tk.Button(self, text="Procurar",
                            command=lambda: controller.show_frame(StartPage))
        button2.place(x=70,y=200)
Beispiel #6
0
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        label = tk.Label(self, text="Game Maniacos", font=LARGE_FONT)
        label.pack(pady=10, padx=10)

        button = tk.Button(self,
                           text="Jogos",
                           width=20,
                           command=lambda: controller.show_frame(Jogos))
        button.pack(pady=2, padx=10)

        button2 = tk.Button(self,
                            text="Consoles",
                            width=20,
                            command=lambda: controller.show_frame(Consoles))
        button2.pack(pady=2, padx=10)

        button3 = tk.Button(self,
                            text="Produtoras",
                            width=20,
                            command=lambda: controller.show_frame(Produtoras))
        button3.pack(pady=2, padx=10)

        button4 = tk.Button(self,
                            text="Acessorio",
                            width=20,
                            command=lambda: controller.show_frame(Acessorio))
        button4.pack(pady=2, padx=10)

        button5 = tk.Button(self,
                            text="Informações",
                            width=20,
                            command=lambda: controller.show_frame(informacoes))
        button5.pack(pady=2, padx=10)

        button6 = tk.Button(self,
                            text="Sobre",
                            width=5,
                            command=lambda: controller.show_frame(Sobre))
        button6.pack(pady=2, padx=10)
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        conect = conexao.conexao()
        cursor = conect.Cursor

        cursor.execute(
            "SELECT usuario FROM sessao WHERE id = (SELECT MAX(id) FROM sessao);"
        )
        test = cursor.fetchone()

        cursor.execute("SELECT * FROM pessoa WHERE id = %s;", (test))
        test1 = cursor.fetchone()

        lb1 = tk.Label(self, text="Nome Completo")
        lb1.place(x=10, y=0)

        nome = tk.Label(self, text=test1[1])
        nome.place(x=10, y=20)

        lb2 = tk.Label(self, text="Senha")
        lb2.place(x=10, y=50)

        senha = tk.Label(self, text=test1[2])
        senha.place(x=10, y=70)

        lb4 = tk.Label(self, text="Email")
        lb4.place(x=10, y=100)

        email = tk.Label(self, text="Email Usuario")
        email.place(x=10, y=120)

        lb5 = tk.Label(self, text="Endereco")
        lb5.place(x=10, y=150)

        ende = tk.Label(self, text="Endereço Usuario")
        ende.place(x=10, y=170)

        lb6 = tk.Label(self, text="Cidade")
        lb6.place(x=10, y=200)

        cid = tk.Label(self, text="Cidade Usuario")
        cid.place(x=10, y=220)

        lb7 = tk.Label(self, text="Bairro")
        lb7.place(x=10, y=250)

        bair = tk.Label(self, text="Bairro Usuario")
        bair.place(x=10, y=270)

        lb8 = tk.Label(self, text="CEP")
        lb8.place(x=10, y=300)

        cep = tk.Label(self, text="CEP Usuario")
        cep.place(x=10, y=320)

        btentrar2 = tk.Button(
            self,
            text="Alterar Senha",
            command=lambda: controller.show_frame(alterarsenha))
        btentrar2.place(x=10, y=360)

        btgravasenha2 = tk.Button(
            self,
            text="Voltar",
            command=lambda: controller.show_frame(StartPage))
        btgravasenha2.place(x=160, y=360)

        lb15 = tk.Label(self, text="")
        lb15.place(x=10, y=450)
Beispiel #8
0
def main():
    def bt_entrar(val2):

        try:
            conect = conexao.conexao()

            connection = conect.connection

            cursor = connection.cursor()

            logintest = login.get()
            senhatest = confpas.get()
            #print(teste)

            cursor.execute(
                f"SELECT id FROM pessoa WHERE nome = '{logintest}' and senha = '{senhatest}' ;"
            )
            test = cursor.fetchone()

            if test != None:
                time.sleep(2)
                jpas.destroy()
                app = SeaofBTCapp()
                app.title("Game Maniacos")
                app.geometry("300x400+100+100")

                # cursor.execute("INSERT INTO sessao (id, usuario) VALUES (nextval('s_idsessao'),%s)",(test))
                #connection.commit()

                app.mainloop()

        except (Exception, conexao.psycopg2.Error) as error:
            print("Error while connecting to PostgreSQL", error)
        finally:
            #closing database connection.
            if (connection):
                cursor.close()
                connection.close()
                print("PostgreSQL connection is closed")

    lb1 = tk.Label(jpas, text="Login")
    lb1.place(x=10, y=0)

    login = tk.Entry(jpas, width=49)
    login.place(x=10, y=20)

    lb2 = tk.Label(jpas, text="Senha")
    lb2.place(x=10, y=50)

    confpas = tk.Entry(jpas, width=49)
    confpas.place(x=10, y=70)

    btentrar = tk.Button(jpas, text="ENTRAR", width=20)
    btentrar.place(x=10, y=90)
    btentrar["command"] = partial(bt_entrar, btentrar)

    btgravasenha = tk.Button(jpas,
                             text="Cadastro",
                             width=20,
                             command=bt_cadastro)
    btgravasenha.place(x=160, y=90)

    jpas.geometry("350x150+100+100")
    jpas.mainloop()
class bt_cadastro(tk.Frame):
    
    def bt_sair():
        cadastro1.destroy()

    def bt_salvar12(val):
        
        
        if ((senha.get() and confsenha.get()) != ("") ):
            lb15["text"] = "Senha não igual"
            if((senha.get())== confsenha.get()):
                lb15["text"] = "Cadastro efetuado"
                try:

                    Conect = conexao.conexao()
                    cursor = Conect.Cursor
                    connection = Conect.connection

                    cursor.execute("SELECT MAX(id) FROM pessoa;")
                    test = cursor.fetchone()
                    test1 = test[0]
                    if test1 == None:
                        test1 = 1
                    else:
                        test1 += 1

                    cursor.execute("INSERT INTO pessoa (id, nome, senha) VALUES (%s, %s,%s)",(test1, nome.get(), senha.get()))
                    connection.commit()

    
                    cursor.execute("SELECT * FROM pessoa;")
                    test = cursor.fetchall()
                    print(test)
    
                except (Exception, conexao.psycopg2.Error) as error :
                    print ("Error while connecting to PostgreSQL", error)
                finally:
                    #closing database connection.
                        if(connection):
                            Conect.FecharConexao()
                            print("PostgreSQL connection is closed")

                            
                            time.sleep(2)
                            cadastro1.destroy()
                

                
                            
        else:
            lb15["text"] = "Preencha corretamente"
    
    
    def __init__(self, parent, controller):
        tk.Frame.__init__(self, parent)

        cadastro1 = tk.Tk()
    cadastro1.title("Cadastro")

        lb1 = tk.Label(cadastro1, text="Nome Completo")
        lb1.place(x=10, y=0)

        nome = tk.Entry(cadastro1, width = 49)
        nome.place(x=10, y=20)

        lb2 = tk.Label(cadastro1, text="Senha")
        lb2.place(x=10, y=50)

        senha = tk.Entry(cadastro1, width = 49)
        senha.place(x=10, y=70)

        lb3 = tk.Label(cadastro1, text="Confirmar senha")
        lb3.place(x=10, y=100)

        confsenha = tk.Entry(cadastro1, width = 49)
        confsenha.place(x=10, y=120)

        lb4 = tk.Label(cadastro1, text="Email")
        lb4.place(x=10, y=150)

        email = tk.Entry(cadastro1, width = 49)
        email.place(x=10, y=170)

        lb5 = tk.Label(cadastro1, text="Endereco")
        lb5.place(x=10, y=200)

        ende = tk.Entry(cadastro1, width = 49)
        ende.place(x=10, y=220)

        lb6 = tk.Label(cadastro1, text="Cidade")
        lb6.place(x=10, y=250)

        cid = tk.Entry(cadastro1, width = 49)
        cid.place(x=10, y=270)

        lb7 = tk.Label(cadastro1, text="Bairro")
        lb7.place(x=10, y=300)

        bair = tk.Entry(cadastro1, width = 49)
        bair.place(x=10, y=320)

        lb8 = tk.Label(cadastro1, text="CEP")
        lb8.place(x=10, y=350)

        cep = tk.Entry(cadastro1, width = 49)
        cep.place(x=10, y=370)

        btentrar2 = tk.Button(cadastro1, text="Salvar", width=20)
        btentrar2.place(x=10, y=400) 
        btentrar2["command"] = partial(bt_salvar12, btentrar2)

                
        btgravasenha2 = tk.Button(cadastro1, text="Sair", width=20, command=bt_sair)
        btgravasenha2.place(x=160, y=400)

        lb15 = tk.Label(cadastro1, text="")
        lb15.place(x=10, y=450)

        cadastro1.geometry("370x500+100+100")
        cadastro1.mainloop()