Пример #1
0
def onPaste():
    global listbox_faces, person
    # переносим из bufer в выбранный профиль
    answer, person_buf = db.search_person("bufer")
    if answer:
        for f in person_buf.face:
            db.set_face(person, f)
    refesh_persone()
Пример #2
0
def onPaste(person):
    global listbox_faces
    # переносим из bufer в выбранный профиль
    answer, person_buf = db.search_person("bufer")
    if answer:
        for f in person_buf.face:
            db.set_face(person, f)
    WindowfPersonRefresh(person)
Пример #3
0
def set_face(persone, face):
    global mass_faces
    # меняем в кэше
    #print (result)
    for i in range(0, len(mass_faces)):
        if mass_faces[i][0]==face.id:
            mass_faces[i][1] = persone.id
    #меняем в базе
    db.set_face(persone, face)
Пример #4
0
def onCut(person):
    global listbox_faces,page_win_person, max_in_page
    #values = [listbox_faces.get(idx) for idx in listbox_faces.curselection()]

    answer, person_buf = db.search_person("bufer")
    if answer:

        # for face in person.face:
        #     print(face)
        list_faces = []
        for n in listbox_faces.curselection():
            #print()
            list_faces.append( person.face[int(page_win_person*max_in_page +n)])

            print(n)
        for f in list_faces:
            db.set_face(person_buf, f)

    WindowfPersonRefresh(person)
Пример #5
0
def onCut():
    global listbox_faces, max_in_page, person, frame5,frame6
    #values = [listbox_faces.get(idx) for idx in listbox_faces.curselection()]
    #page_win_person_main = read_page()
    answer, person_buf = db.search_person("bufer")
    if answer:

        # for face in person.face:
        #     print(face)
        list_faces = []
        for n in listbox_faces.curselection():
            #print(int(page_win_person*max_in_page +n))
            print (page_win_person_main)
            print(int(n), (int(page_win_person_main * max_in_page + n)))
            #num = (int(page_win_person * max_in_page + n))
            list_faces.append( person.face[int(page_win_person_main*max_in_page +n)])
            #list_faces.append(person.face[int(n)])

            print(n)
        for f in list_faces:
            db.set_face(person_buf, f)

    refesh_persone()