コード例 #1
0
ファイル: amigo.py プロジェクト: Mercurio803/Stradu
def SegundaTab():
    f2 = tkinter.Frame(nb)
    nb.add(f2, text="Ver propostas")

    qtd, results_cpf, results_descricao, cp, cd, valor = funcoes_pyhton.ver_propostas_disponiveis(
    )
    for n in range(qtd):
        nome, email, cpf, tipo = funcoes_pyhton.armazenar_client(
            results_cpf[n])
        y1 = 40 + 120 * n
        txt_usuario = tkinter.Label(f2, text="Oferta do caminhoneiro:" + nome)
        txt_usuario.place(x=50, y=y1)
        txt_usuario = tkinter.Label(f2, text="VALOR" + valor[n])
        txt_usuario.place(x=50, y=y1 + 20)
        txt_usuario = tkinter.Label(f2,
                                    text="ROTA: de " + cp[n] + " para " +
                                    cd[n])
        txt_usuario.place(x=50, y=y1 + 40)
        txt_descricao = tkinter.Label(f2,
                                      text="DESCRICAO:" + results_descricao[n])
        txt_descricao.place(x=50, y=y1 + 60)
        btn1 = tkinter.Button(f2,
                              text="Conversar",
                              height=1,
                              width=8,
                              command=lambda: conversar(cpf))
        btn1.place(x=50, y=y1 + 80)
    return
コード例 #2
0
ファイル: autonomo.py プロジェクト: Mercurio803/Stradu
def TerceiraTab():
    f3 = tkinter.Frame(nb)
    nb.add(f3,text="Usuarios")
    arquivo = open('usuario.txt', 'r')
    cpf2 = arquivo.readline()
    arquivo.close()
    result = funcoes_pyhton.monstrar_contatos_em_conversa(cpf2)
    i = 1
    for n in result:
        nome,email,cpf,tipo = funcoes_pyhton.armazenar_client(n)
        y1 = 40+i*70
        i = i+1
        txt_usuario = tkinter.Label(f3,text = "Usuario:" +nome)
        txt_usuario.place(x = 50, y = y1)
        btn1 = tkinter.Button(f3,text = "Conversar",height = 1, width = 8,command = lambda: conversar(cpf))
        btn1.place(x = 200,y = y1)
    return
コード例 #3
0
ファイル: amigo.py プロジェクト: Mercurio803/Stradu
def SegundaTab():
    f2 = tkinter.Frame(nb)
    nb.add(f2, text="Ver propostas")

    qtd, results_cpf, results_descricao = funcoes_pyhton.ver_propostas_disponiveis(
    )
    for n in range(qtd):
        nome, email, cpf = funcoes_pyhton.armazenar_client(results_cpf[n])
        y1 = 40 + 70 * n
        txt_usuario = tkinter.Label(f2, text="Usuario:" + nome)
        txt_usuario.place(x=50, y=y1)
        txt_descricao = tkinter.Label(f2,
                                      text="DESCRICAO:" + results_descricao[n])
        txt_descricao.place(x=50, y=y1 + 20)
        btn1 = tkinter.Button(f2,
                              text="Conversar",
                              height=1,
                              width=8,
                              command=lambda: conversar(cpf))
        btn1.place(x=50, y=y1 + 40)
    return
コード例 #4
0
ファイル: chat.py プロジェクト: Mercurio803/Stradu
root.geometry("350x630")
root.title("Chat")

#Make the notebook
nb = ttk.Notebook(root, height = 630, width = 350)
nb.grid(column = 0, row = 0)
    
arquivo1 = open('destinatario.txt', 'r')
cpf_d = arquivo1.readline()
arquivo1.close()
    
arquivo2 = open('usuario.txt', 'r')
cpf_r = arquivo2.readline()
arquivo2.close()
    
nome1,email1,cpf1 = funcoes_pyhton.armazenar_client(cpf_d)
nome2,email2,cpf2 = funcoes_pyhton.armazenar_client(cpf_r)
    
valor, intq, ordem = funcoes_pyhton.todas_mensagens(cpf_d,cpf_r)

def PrimeiraTab():   
    f1 = tkinter.Frame(nb)
    nb.add(f1,text=nome1)
    tkinter.LabelFrame(f1)
     
    u = 0
    for n in range(intq):
        a = n-1
        if a in ordem:
            usuario = "Eu"
        else: