Пример #1
0
def historial():
    tabla = ThemedTk(theme='plastik')
    if platform.system() == "Windows":
        tabla.iconbitmap(os.getcwd() + '\\avance.ico')
    tabla.title('Historial Académico')
    ventana = Frame(tabla)
    ventana.config(width='390', height='80')
    scrollbar = Scrollbar(tabla)
    scrollbar.pack(side=RIGHT, fill=Y)
    resumen = ttk.Treeview(tabla, yscrollcommand=scrollbar.set)
    resumen.pack(fill='both', expand=True)
    scrollbar.config(command=resumen.yview)
    resumen["columns"] = ("uno", "dos", "tres")
    resumen.column("#0", width=10, minwidth=20)
    resumen.column("uno", width=50, minwidth=50)
    resumen.column("dos", width=230, minwidth=80)
    resumen.column("tres", width=120, minwidth=50)
    resumen.heading("uno", text="ID")
    resumen.heading("dos", text="MATERIA")
    resumen.heading("tres", text="CALIFICACIÓN")
    materias = cursor.execute(
        "SELECT id, Nombre, Calificacion FROM historia").fetchall()
    for materia in materias:
        resumen.insert("", END, values=(materia))
    tabla.mainloop()
Пример #2
0
def main():
    def funcExit():
        message_box = messagebox.askquestion("Exit",
                                             "Do you want to exit?",
                                             icon='warning')
        if message_box == "yes":
            root.destroy()

    def funcAddBook():
        open_add_book = add_book.AddBook()

    def funcAddMember():
        open_add_member = add_member.AddMember()

    root = ThemedTk()
    root.get_themes()
    root.set_theme("arc")
    app = Main(root)

    #MenuBar
    menu_bar = Menu(root)
    root.config(menu=menu_bar)
    file = Menu(menu_bar, tearoff=0)
    menu_bar.add_cascade(label="File", menu=file)
    file.add_command(label="Add a Book", command=funcAddBook)
    file.add_command(label="Add a Member", command=funcAddMember)
    file.add_command(label="Show Member")
    file.add_command(label="Exit", command=funcExit)

    root.title("Library Management System")
    root.geometry("1280x720+450+150")
    root.resizable(False, False)
    root.iconbitmap("image/book_tk.ico")
    root.mainloop()
Пример #3
0
def start():
    global root
    root = ThemedTk(theme='scidblue')
    # root = Tk()
    root.title("Work Order Manager")
    root.iconbitmap(str(os.getcwd()+"\\"+"icon-icons.com_main.ico"))
    MainLog(root)
    root.mainloop()
Пример #4
0
def edit():
    tctzn=StringVar()
    nsc = ThemedTk(theme="arc")
    nsc=tk.Toplevel()
    nsc.title("voter_list")
    nsc.geometry("400x300")
    nsc.resizable(False,False)
    nsc.iconbitmap("gov2.ico")
    l1=ttk.Label(nsc,text="Enter Citizenship Number or Voter ID:")
    ectzn = Entry(nsc,textvariable=tctzn)
    l1.place(relx=0.05,rely=0.5)
    ectzn.place(relx=0.559, rely=0.49)

    def sreh(*args):
        global vid
        flag=""
        c = sqlite3.connect("voterlist.db", check_same_thread=False)
        tc = c.execute("SELECT usr,pw,eml,phon,cou,gen,dob,ph,cid,vid,vtsta from voterlist")
        print(str(tctzn.get()))
        print("dfd")
        i=0
        for item in tc:
            if str(item[8]) == str(tctzn.get()) or str(item[9]) == str(tctzn.get()):
                flag="True"
                l1.destroy()
                ectzn.destroy()
                b1.destroy()
                la = ttk.Label(nsc)
                la["text"] = "Information is:\n" + "Name:" + str(item[0]) + "\nPhone Number: " + str(
                    item[3]) + "\nDate of birth: " + str(item[6]) + "\nEmail: " + str(
                    item[2]) + "\nVote Status: " + str(item[10])
                la.place(relx=0.01, rely=0.1)
                vid = (int(item[9]),)

                def dele():
                    global vid
                    print(vid)
                    tc = sqlite3.connect("voterlist.db", check_same_thread=False)
                    tc.execute("""DELETE FROM voterlist  WHERE vid=(?)""", vid)
                    tc.commit()
                    tc.close()
                    la.destroy()
                    messagebox.showinfo(message="Information deleted !")
                    nsc.destroy()

                bu1 = ttk.Button(nsc, text="Delete", command=dele)
                bu1.place(relx=0.6, rely=0.58)
                bu2 = ttk.Button(nsc, text="Back", command=sreh)
                bu2.place(relx=0.32, rely=0.58)
        if flag!="True":
            messagebox.showinfo(message="No match found!")
            nsc.destroy()

    b1 = ttk.Button(nsc, text="Search", command=lambda:sreh(tctzn.get()))
    b1.place(relx=0.6, rely=0.58)
    nsc.mainloop()
Пример #5
0
def do_gui():
    root = ThemedTk(theme="plastik")
    root.title('JANKIGEN - ' + version_string)

    favicon_path = '/res/favicon.ico'
    if os.path.isfile(os.path.dirname(__file__) + favicon_path):
        root.iconbitmap(os.path.dirname(__file__) + favicon_path)
    else:
        root.iconbitmap(os.path.dirname(sys.argv[0]) + favicon_path)
    app = Application(master=root)
    app.mainloop()
Пример #6
0
def start(func, kol, speed, values=None, color_scheme="dracula"):
    root_main = ThemedTk()
    root_main.iconbitmap('icon.ico')
    root_main.title("Vizulization")
    root_main.set_theme('equilux')
    height = root_main.winfo_screenheight() - 300
    width = root_main.winfo_screenwidth() - 300
    root_main.geometry(
        '{}x{}+{}+{}'.format(width, height, (root_main.winfo_screenwidth() - width) // 2,
                             (root_main.winfo_screenheight() - height) // 2))
    root_main.resizable(False, False)
    if values:
        kol = len(values)
    func(width, height, kol, name=root_main, color_scheme=color_scheme, speed=speed, values=values).sort()
    root_main.mainloop()
Пример #7
0
def vvtl():
    nsc=ThemedTk(theme="arc")
    nsc.title("voter_list")
    w, h = nsc.winfo_screenwidth(), nsc.winfo_screenheight()
    nsc.geometry("%dx%d+0+0" % (w, h))
    nsc.iconbitmap("gov2.ico")
    c = sqlite3.connect("voterlist.db", check_same_thread=False)
    tc = c.execute("SELECT usr,pw,eml,phon,cou,gen,dob,ph,cid,vid,vtsta from voterlist")
    l=ttk.Label(nsc,text="Name:\t\t\tPassword:\t\tEmail:\t\t\t\tPhone Number:\t\tAddress:\t\t\tGender:\t\tDate of Birth:\t\tCitizenship ID Number:\tVoter ID Number:\t\tVote Status:")
    l.place(relx=0.01,rely=0.01)
    i=0.04
    for item in tc:
        l=ttk.Label(nsc,text=str(item[0])+"\t\t"+str(item[1])+"\t\t"+str(item[2])+"\t"+str(item[3])+"\t\t"+str(item[4])+"\t"+str(item[5])+"\t\t"+str(item[6])+"\t\t"+str(item[8])+"\t\t"+str(item[9])+"\t\t"+str(item[10]))
        l.place(relx=0.01,rely=i)
        i+=0.02
        print(item[0])
    nsc.mainloop()
Пример #8
0
        RPC.connect()
        DefaultPresence()
    ConfigLoad()
    MainWindow = ThemedTk(theme=Config.Theme)
    Update()
    #Styles
    s = ttk.Style()
    s.configure('TButton', background=Config.FG_Colour, fieldbackground=Config.FG_Colour)
    s.configure('TCheckbutton', background=Config.BG_Colour, foreground="white")
    s.configure('TEntry', fieldbackground=Config.FG_Colour, background=Config.FG_Colour)

    MainWindow.configure(background=Config.BG_Colour) # sets bg colour
    MainWindow.title("PyMyMC") # sets window title
    if System == "Windows":
        #other systems dont use ico
        MainWindow.iconbitmap(Path.Logo_Icon) # sets window icon
    MainWindow.resizable(False, False) #makes the window not resizable
    MainWindow.protocol("WM_DELETE_WINDOW", ExitHandler) #runs the function when the user presses the X button

    #Logo Image
    PyMyMC_Logo = PhotoImage(file=Path.Logo_Small)
    PyMyMC_Logo_Label = Label(MainWindow, image=PyMyMC_Logo)
    PyMyMC_Logo_Label['bg'] = PyMyMC_Logo_Label.master['bg']
    PyMyMC_Logo_Label.grid(row=0, column=0) 

    #Info Label
    PInfo_Label = Label(MainWindow, text=f"PyMyMC {Config.Version}", bg=Config.BG_Colour, fg = 'white', font = "Arial 15 bold")
    PInfo2_Label = Label(MainWindow, text="Made by RealistikDash", bg=Config.BG_Colour, fg = 'white', font = "none 13")
    PInfo_Label.grid(row=2, column=0, sticky=W)
    PInfo2_Label.grid(row=3, column=0, sticky=W)
Пример #9
0
class UpdateBook_Frame:
    def do_updateBook(self):

        bookTools = BookTools()
        book = Book()

        author = Author()
        authorTools = AuthorTools()

        publisher = Publisher()
        publisherTools = PublisherTools()

        if (self.idBookEntry['text'] != None and self.idBookEntry['text'] != ""
                and self.nameBookEntry.get() != None
                and self.nameBookEntry.get() != ""
                and self.priceEntry.get() != None
                and self.priceEntry.get() != ""
                and self.typeEntry.get() != None and self.typeEntry.get() != ""
                and self.authorEntry.get() != None
                and self.authorEntry.get() != ""
                and self.publisherEntry.get() != None
                and self.publisherEntry.get() != ""
                and self.workplaceEntry.get() != None
                and self.workplaceEntry.get() != ""
                and self.addressEntry.get() != None
                and self.addressEntry.get() != ""):

            book.setIdBook(self.idBookEntry['text'])
            book.setNameBook(self.nameBookEntry.get())
            book.setPrice(self.priceEntry.get())
            book.setType(self.typeEntry.get())
            book.setAuthor(self.authorEntry.get())
            book.setPublisher(self.publisherEntry.get())

            author.setName(self.authorEntry.get())
            author.setWorkplace(self.workplaceEntry.get())

            publisher.setName(self.publisherEntry.get())
            publisher.setAddress(self.addressEntry.get())

            publisherTools.UpdatePublisher(publisher)
            publisherTools.addPublisher(publisher)

            authorTools.UpdateAuthor(author)
            authorTools.addAuthor(author)

            i = bookTools.UpdateBook(book)
            if i == 1:
                messagebox.showinfo("Sucessfully Update",
                                    "Sucessfully Update The Book Infomation")
                MsgBox = messagebox.askquestion(
                    'Continue',
                    'Are you sure you want to Continue',
                    icon='info')
                if MsgBox != 'yes':
                    self.root.destroy()
                return
            else:
                messagebox.showinfo("Failed to Update",
                                    "Failed to Update The Book Infomation")
                MsgBox = messagebox.askquestion(
                    'Continue',
                    'Are you sure you want to Continue',
                    icon='info')
                if MsgBox != 'yes':
                    self.root.destroy()
                return
        else:
            messagebox.showinfo("Please Enter the Infomation",
                                "Please Enter the Infomation")

    def __init__(self, Book_ManegementFrame):

        self.root = ThemedTk(theme="equilux")

        #Setting the Title
        self.root.title("Library Management System")

        #Setting the icon
        self.root.iconbitmap('src\\picture\\library.ico')

        #Get the screen resolution
        self.x = self.root.winfo_screenwidth()
        self.y = self.root.winfo_screenheight()

        #Get the value for windows size
        self.x1 = self.x * (4 / 9)
        self.y1 = self.y * (5 / 11)

        #Get the value for Starting point for windows
        self.x2 = self.x * (3 / 11)
        self.y2 = self.y * (2 / 9)

        self.root.geometry("%dx%d+%d+%d" %
                           (self.x1, self.y1, self.x2, self.y2))
        self.root.resizable(False, False)

        #Easy for configure within attribute
        self.x1 = int(self.x1)
        self.y1 = int(self.y1)

        #Setting Entry variable
        self.nameBook = StringVar()
        self.price = StringVar()
        self.type = StringVar()
        self.author = StringVar()
        self.workplace = StringVar()
        self.publisher = StringVar()
        self.address = StringVar()

        self.style = ttk.Style()
        self.style.configure("Title.TLabel", foreground="snow")
        self.style.configure("Nav.TButton",
                             font=("Cascadia Code SemiBold", 12))
        self.style.configure("Content.TFrame",
                             foreground="black",
                             background="LightSkyBlue2")
        self.style.configure("Content.TLabel",
                             foreground="black",
                             background="LightSkyBlue2")
        self.style.configure("Nav.TFrame",
                             foreground="black",
                             background="SeaGreen1")

        self.content_frame = ttk.Frame(self.root, style="Content.TFrame")
        self.content_frame.place(relwidth=1, relheight=1)

        self.idBookLabel = ttk.Label(self.content_frame,
                                     text="Book ID :",
                                     font=("Cascadia Code SemiBold", 12),
                                     style="Content.TLabel")
        self.idBookLabel.place(relx=0.3, rely=0.05)

        self.idBookEntry = ttk.Label(self.content_frame,
                                     text="%s" % Book_ManegementFrame.idbook,
                                     font=("Cascadia Code", 12),
                                     style="Content.TLabel")
        self.idBookEntry.place(relx=0.43, rely=0.05)

        self.nameBookLabel = ttk.Label(self.content_frame,
                                       text="Name :",
                                       font=("Cascadia Code SemiBold", 12),
                                       style="Content.TLabel")
        self.nameBookLabel.place(relx=0.34, rely=0.15)

        self.nameBookEntry = ttk.Entry(self.content_frame,
                                       font=("Cascadia Code", 12),
                                       textvariable=self.nameBook)
        self.nameBookEntry.place(relx=0.43, rely=0.15)

        self.priceLabel = ttk.Label(self.content_frame,
                                    text="Price :",
                                    font=("Cascadia Code SemiBold", 12),
                                    style="Content.TLabel")
        self.priceLabel.place(relx=0.327, rely=0.25)

        self.priceEntry = ttk.Entry(self.content_frame,
                                    font=("Cascadia Code", 12),
                                    textvariable=self.price)
        self.priceEntry.place(relx=0.43, rely=0.25)

        self.typeLabel = ttk.Label(self.content_frame,
                                   text="Type :",
                                   font=("Cascadia Code SemiBold", 12),
                                   style="Content.TLabel")
        self.typeLabel.place(relx=0.34, rely=0.35)

        self.typeEntry = ttk.Entry(self.content_frame,
                                   font=("Cascadia Code", 12),
                                   textvariable=self.type)
        self.typeEntry.place(relx=0.43, rely=0.35)

        self.authorLabel = ttk.Label(self.content_frame,
                                     text="Author :",
                                     font=("Cascadia Code SemiBold", 12),
                                     style="Content.TLabel")
        self.authorLabel.place(relx=0.15, rely=0.45)

        self.authorEntry = ttk.Entry(self.content_frame,
                                     font=("Cascadia Code", 12),
                                     textvariable=self.author)
        self.authorEntry.place(relx=0.26, rely=0.45, relwidth=0.2)

        self.workplaceLabel = ttk.Label(self.content_frame,
                                        text="Workplace :",
                                        font=("Cascadia Code SemiBold", 12),
                                        style="Content.TLabel")
        self.workplaceLabel.place(relx=0.5, rely=0.45)

        self.workplaceEntry = ttk.Entry(self.content_frame,
                                        font=("Cascadia Code", 12),
                                        textvariable=self.workplace)
        self.workplaceEntry.place(relx=0.65, rely=0.45, relwidth=0.2)

        self.publisherLabel = ttk.Label(self.content_frame,
                                        text="Publisher :",
                                        font=("Cascadia Code SemiBold", 12),
                                        style="Content.TLabel")
        self.publisherLabel.place(relx=0.11, rely=0.55)

        self.publisherEntry = ttk.Entry(self.content_frame,
                                        font=("Cascadia Code", 12),
                                        textvariable=self.publisher)
        self.publisherEntry.place(relx=0.26, rely=0.55, relwidth=0.2)

        self.addressLabel = ttk.Label(self.content_frame,
                                      text="Address :",
                                      font=("Cascadia Code SemiBold", 12),
                                      style="Content.TLabel")
        self.addressLabel.place(relx=0.528, rely=0.55)

        self.addressEntry = ttk.Entry(self.content_frame,
                                      font=("Cascadia Code SemiBold", 12),
                                      textvariable=self.address)
        self.addressEntry.place(relx=0.65, rely=0.55, relwidth=0.2)

        self.updateButton = ttk.Button(self.content_frame,
                                       text="Update",
                                       style="Nav.TButton")
        self.updateButton.place(relx=0.45, rely=0.7)

        self.root.mainloop()
Пример #10
0
    nombre = usuario.get()
    programa = carrera.get()
    cantidad = creditos.get()
    cursor.execute(
        "INSERT INTO registro (Nombre, Carrera, Creditos) values(?,?,?)",
        (nombre, programa, cantidad))
    bd.commit()
    registro.destroy()


if 'registro' not in tab:
    cursor.execute(
        "CREATE TABLE registro (Nombre TEXT, Carrera TEXT, Creditos INTEGER)")
    registro = ThemedTk(theme='plastik')
    if platform.system() == "Windows":
        registro.iconbitmap(os.getcwd() + '\\avance.ico')
    registro.title('HSUN')
    ventana = Frame(registro)
    ventana.config(width='430', height='170', bg='#F8F9FB')
    ventana.pack()

    # Título
    etiqueta = Label(registro,
                     text="Por favor complete la siguiente información: ",
                     font=("Calibri", 13, "bold"))
    etiqueta.place(x=220, y=20, anchor='center')
    etiqueta.config(bg='#F8F9FB')

    #Entradas
    nombre = Label(registro, text="Nombre: ", font=("Arial", 11))
    nombre.place(x=20, y=50)
Пример #11
0
    except Exception:
        base_path = os.path.abspath(".")
    return os.path.join(base_path, relative_path)

#------------
#Erzeugung der GUI
#------------

#Erstellt das Fenster mit dem gewünschten Aussehen
window = ThemedTk(theme='arc')
window.resizable(0,0)
window.title("Gruppenfoto 2.0")
window.configure(bg='white')

#Läd das Programmicon
window.iconbitmap(resource_path('logo.ico')) 

#Definiert die gewünschten Schriftarten und Stile der Benutzeroberfläche
fontStyle = tkFont.Font(size=12, family= "Calibri")
fontStyle_label = tkFont.Font(size=15, family='Calibri Light')
ttk.Style().configure(".", padding=6, relief="flat",
   foreground="black", background="white", font=fontStyle)
ttk.Style().configure("TLabel", font=fontStyle_label)
ttk.Style().configure("TEntry", font=fontStyle)
fontStyle_2 = tkFont.Font(size=25, family='Calibri Light')

#-----------
#Definieren und setzen der Elemente
#-----------

ttk.Label(window,text="Gruppenfoto 2.0", font=fontStyle_2).pack()
Пример #12
0
from tkinter import *
import tkinter.messagebox
import tkinter.filedialog
from pygame import mixer
from mutagen.mp3 import MP3
from tkinter import ttk
from ttkthemes import ThemedTk
import threading
import time
import os

root =  ThemedTk(theme="radiance")
mixer.init()  # initializing the mixer

root.title('MP3 MUSIC PLAYER')
root.iconbitmap('images/melody.ico')
menubar = Menu(root)
root.config(menu=menubar)

fileSubmenu = Menu(menubar, tearoff=0)
helpSubmenu = Menu(menubar, tearoff=0)

menubar.add_cascade(label="File", menu=fileSubmenu)
menubar.add_cascade(label="Help", menu=helpSubmenu)



play_photo = PhotoImage(file='images/play.png')
pause_photo = PhotoImage(file='images/pause.png')
stop_photo = PhotoImage(file='images/stop.png')
rewind_photo = PhotoImage(file='images/rewind.png')
Пример #13
0
def Login():
    root_login = ThemedTk()
    root_login.get_themes()
    root_login.set_theme("arc")

    def BtnLogin():
        user_name = entry_username.get()
        password = entry_password.get()
        try:
            query = cur.execute("SELECT * FROM register_user").fetchall()
            if user_name == str(query[0][1]) and password == str(query[0][2]):
                messagebox.showinfo("Login Successful",
                                    "Welcome to Library Management System")
                root_login.destroy()
                main()
            else:
                messagebox.showerror("Login Fail",
                                     "Check username or password again")
                exit()
        except:
            messagebox.showerror("Login Fail",
                                 "Check username or password again")
            exit()

    #
    # # MenuBar
    # menu_bar = Menu(root_login)
    # root_login.config(menu=menu_bar)
    # file = Menu(menu_bar, tearoff=0)
    # menu_bar.add_cascade(label="File", menu=file)
    # file.add_command(label="Add a Book", )
    # file.add_command(label="Add a Member", )
    # file.add_command(label="Show Member")
    # file.add_command(label="Exit", )

    main_frame = ttk.Frame(root_login, width=400, height=200)
    main_frame.pack(fill=X)

    label_username = Label(main_frame, text="Username:"******"Arial 15 bold")
    label_username.grid(row=0, column=0, padx=(30, 0), pady=(30, 0), sticky=W)

    entry_username = ttk.Entry(main_frame, width=23, font="Arial 13 bold")
    entry_username.grid(row=0, column=1, padx=(20, 0), pady=(30, 0))

    label_password = Label(main_frame, text="Password:"******"Arial 15 bold")
    label_password.grid(row=1, column=0, padx=(30, 0), pady=(15, 0), sticky=W)

    entry_password = ttk.Entry(main_frame, width=23, font="Arial 13 bold")
    entry_password.config(show="*")
    entry_password.grid(row=1, column=1, padx=(20, 0), pady=(15, 0))
    btn_login = Button(root_login,
                       text="Login",
                       font="Arial 13 bold",
                       width=15,
                       bg="#4285f4",
                       fg="#ececec",
                       command=BtnLogin)
    btn_login.place(x=120, y=120)

    root_login.title("Library Management System")
    root_login.geometry("400x200+700+400")
    root_login.resizable(False, False)
    root_login.iconbitmap("image/book_tk.ico")
    root_login.mainloop()
from tkinter import *
from tkinter import ttk
from tkinter import messagebox as msg
from tooltips_2 import CreateToolTip
from ttkthemes import ThemedTk, THEMES
from PIL import Image
from pytesseract import pytesseract
import os

root = ThemedTk(themebg=True)
root.set_theme('plastik')
root.title('Extract text from image')
root.iconbitmap('D:/python_dars/coding.ico')
root.geometry('500x300+300+200')
root.resizable(False, False)

path_to_tesseract = r"C:\Program Files\Tesseract-OCR\tesseract.exe"


def limitsize(*args):
    length = len(kirit.get())
    ga = kirit.index(INSERT)
    if length > 100:
        ending = kirit.index(END)
    if length > 100 and ga != ending:
        msg.showwarning(
            'Ogohlantirish',
            'Buncha ko\'p nomli faylning manzili bo\'lmaydi!Iltimos qisqa faylning manzilini kiriting@'
        )
        ga_1 = kirit.index(INSERT)
        kirit.delete(ga_1, ga_1 + 1)
Пример #15
0
from tkinter import *
import tkinter as tk
from tkinter import ttk
from ttkthemes import ThemedTk
import threading
import temp_ser
from tkinter import messagebox
import _tkinter
import time
import sqlite3
import base64
sc=ThemedTk(theme="arc")
sc.minsize(300,300)
sc.resizable(False,False)
sc.title("server_status")
sc.iconbitmap("gov2.ico")
l=Label(sc,font={"10"},fg="green")
i=0
global tctzn
tctzn=StringVar
def staser():
    def th():
        i=0
        t1=threading.Thread(target=temp_ser.main)
        t1.daemon=True
        t1.start()

        b2.destroy()
        b1 = ttk.Button(sc, text="Stop Server", command=ext)
        b1.place(relx=0.38, rely=0.3)
Пример #16
0
def main():
    global message
    message = ""
    if "alarm.mp3" not in os.listdir("."):
        print("alarm.mp3 not found please check it out")
        time.sleep(5)
        raise Exception("alarm.mp3 not found please check it out")
    LARGE_FONT = ("Verdana", 12)
    root = ThemedTk(theme="adapta")
    root.title('HOTSPOT')
    root.bind('<Escape>', lambda e: root.destroy())
    root.protocol("WM_DELETE_WINDOW", root.iconify)
    root.update_idletasks()
    try:
        root.iconbitmap('icon.ico')
    except:
        pass
    home = ttk.Frame(root)
    home.grid(row=0, column=0, sticky='news')
    home.rowconfigure([0], weight=1)
    home.columnconfigure([0, 1], weight=1)
    server = ttk.Frame(root)
    server.grid(row=0, column=0, sticky='news')
    server.rowconfigure([0, 1, 2, 3], weight=1)
    server.columnconfigure([0], weight=1)
    status5 = ttk.Label(server, text="", font=LARGE_FONT, anchor=tk.CENTER)
    status5.grid(row=2, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    status7 = ttk.Label(server, text="", font=LARGE_FONT, anchor=tk.CENTER)
    status7.grid(row=1, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    progress2 = ttk.Progressbar(server,
                                orient="horizontal",
                                mode="determinate",
                                cursor='spider')
    progress2.grid(row=3, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    progress2["maximum"] = 100
    button3 = ttk.Button(server,
                         text="Start",
                         width=15,
                         command=lambda: Thread(target=lambda: makeserver(
                             status7, progress2, server)).start())
    button3.grid(row=1, column=2, sticky=tk.N + tk.S + tk.E + tk.W)
    button3 = ttk.Button(home,
                         text="Recieve",
                         width=15,
                         command=lambda: raise_frame(server, "R", status5))
    button3.grid(row=0, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    button4 = ttk.Button(home,
                         text="Send",
                         width=15,
                         command=lambda: raise_frame(page, "S", status6))
    button4.grid(row=0, column=1, sticky=tk.N + tk.S + tk.E + tk.W)

    page = ttk.Frame(root)
    page.grid(row=0, column=0, sticky='news')
    page.rowconfigure([0, 1, 2], weight=1)
    page.columnconfigure([0], weight=1)
    progress = ttk.Progressbar(page,
                               orient="horizontal",
                               mode="determinate",
                               cursor='spider')
    progress.grid(row=1, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    progress["maximum"] = 100
    status6 = ttk.Label(page, text="", font=LARGE_FONT, anchor=tk.CENTER)
    status6.grid(row=2, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    startpage = ttk.Frame(page)
    startpage.grid(row=0, column=0, sticky='news')
    startpage.rowconfigure([0, 1, 2], weight=1)
    startpage.columnconfigure([0, 1, 2], weight=1)
    HOST = ttk.Entry(startpage)
    HOST.grid(row=1, column=1, sticky=tk.N + tk.S + tk.E + tk.W)
    PORT = ttk.Entry(startpage)
    PORT.grid(row=2, column=1, sticky=tk.N + tk.S + tk.E + tk.W)
    PORT.insert(tk.END, '65432')
    button = ttk.Button(
        startpage,
        text="send",
        width=15,
        command=lambda: Thread(target=lambda: connect(page, progress, HOST.get(
        ), int(PORT.get()))).start())
    button.grid(row=2, column=2, sticky=tk.N + tk.S + tk.E + tk.W)
    status = ttk.Label(startpage,
                       text="click for connecting and sending",
                       font=LARGE_FONT,
                       anchor=tk.CENTER)
    status.grid(row=0, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    status1 = ttk.Label(startpage, text="", font=LARGE_FONT, anchor=tk.CENTER)
    status1.grid(row=0, column=2, sticky=tk.N + tk.S + tk.E + tk.W)
    status2 = ttk.Label(startpage, text="", font=LARGE_FONT, anchor=tk.CENTER)
    status2.grid(row=0, column=1, sticky=tk.N + tk.S + tk.E + tk.W)
    status3 = ttk.Label(startpage,
                        text="IP ",
                        font=LARGE_FONT,
                        anchor=tk.CENTER)
    status3.grid(row=1, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    status4 = ttk.Label(startpage,
                        text="PORT",
                        font=LARGE_FONT,
                        anchor=tk.CENTER)
    status4.grid(row=2, column=0, sticky=tk.N + tk.S + tk.E + tk.W)
    button2 = ttk.Button(startpage,
                         text="open file",
                         width=15,
                         command=lambda: Open(progress))
    button2.grid(row=1, column=2, sticky=tk.N + tk.S + tk.E + tk.W)
    center(root)
    menubar = tk.Menu(root)
    filemenu = tk.Menu(menubar, tearoff=False)
    filemenu.add_command(label="Home", command=lambda: raise_frame(home))
    filemenu.add_command(label="Exit", command=root.destroy)
    menubar.add_cascade(label="MENU", menu=filemenu)
    root.config(menu=menubar)
    root.deiconify()
    root.resizable(width=False, height=False)
    raise_frame(home)
    root.mainloop()
class MainWindow:
    def __init__(self):
        self.rootpath = '.\\'
        # self.root = mtTkinter.Tk()
        self.root = ThemedTk(theme="breeze")
        self.initFiles()
        self.initMainWindowUI()
        self.style = ttk.Style()
        # print(self.style.theme_names())
        # self.style.theme_use('xpnative')

    def run(self):
        self.root.mainloop()


    def initFiles(self):
        files = [
            'out_input.dir', 'out_output.dir', 'out_exe.dir', 'empty.tgen',
            'in_input.dir', 'in_exe.dir','script.tgen', 'tgenValidation.log'
        ]

        for file in files:
            filePath = self.rootpath + 'appdata\\files\\' + file
            if not isfile(filePath):
                f = open(filePath, 'w+')
                f.close()

    def initMainWindowUI(self):
        self.root.title('Testcase Generator')
        # self.root.iconbitmap('favicon.ico')
        self.root.iconbitmap(self.rootpath + 'appdata\\images\\favicon.ico')

        w = 655 # width for the Tk root
        h = 610 # height for the Tk root

        # get screen width and height
        ws = self.root.winfo_screenwidth() # width of the screen
        hs = self.root.winfo_screenheight() # height of the screen

        # calculate x and y coordinates for the Tk root window
        x = (ws/2) - (w/2)
        y = (hs/2) - (h/2)

        # set the dimensions of the screen 
        # and where it is placed
        self.root.geometry('%dx%d+%d+%d' % (w, h, x, y))
        self.root.resizable(0, 0)

        menubar = Menu(self.root)
        self.root.config(menu=menubar)

        # settings_menu = Menu(menubar, tearoff=0)
        # menubar.add_cascade(label="Format", menu=settings_menu)
        # settings_menu.add_command(label="Input File")
        # settings_menu.add_separator()
        # settings_menu.add_command(label="Output File")

        about_menu = Menu(menubar)
        menubar.add_cascade(label="About", command=self.openAbout)

        self.tabs = ttk.Notebook(self.root)
        self.tabs.pack()

        self.inputGeneratorTab = inputGenerator.InputGenerator(self.tabs)
        self.outputGeneratorTab = outputGenerator.OutputGenerator(self.root, self.tabs)
        self.tabs.add(self.inputGeneratorTab.app, text="Input Generator")
        self.tabs.add(self.outputGeneratorTab.app, text="Output Generator")

    def openAbout(self):
        self.about = about.About()
Пример #18
0
    thread.start()
    #print("Not Out")


def reset():
    exit()


WIDTH = 720
HEIGHT = 480

window = ThemedTk(theme="")
window.title("DRS System by RjRahul")
window.geometry("720x595")
window.resizable(0, 0)
window.iconbitmap("images/icon.ico")

cv_img = cv2.cvtColor(cv2.imread("images/bg.jpg"), cv2.COLOR_BGR2RGB)
canvas = Canvas(window, width=WIDTH, height=HEIGHT)
canvas.pack()
photo = PIL.ImageTk.PhotoImage(image=PIL.Image.fromarray(cv_img))
img_on_canvas = canvas.create_image(0, 0, anchor=NW, image=photo)
button = Button(window,
                text="<<Previous (fast)",
                width=50,
                command=partial(play, -25))
button.pack()

button = Button(window,
                text="<<Previous (slow)",
                width=50,
Пример #19
0

def about_us():
    tkinter.messagebox.showinfo(
        'About Melody',
        'This is a music player build using python Tkinter by Nitesh Yadav')


subMenu = Menu(menubar, tearoff=0)
menubar.add_cascade(label="Help", menu=subMenu)
subMenu.add_command(label="About Us", command=about_us)

mixer.init()  # initializing the mixer

root.title("Melody")
root.iconbitmap(r"images/Melody.ico")

leftframe = Frame(root)
leftframe.pack(side=LEFT, padx=30, pady=30)

playlistbox = Listbox(leftframe, width=25)
playlistbox.pack()

add_btn = ttk.Button(leftframe, text="+ Add", command=browse_file)
add_btn.pack(side=LEFT)


def del_song():
    selected_song = playlistbox.curselection()
    selected_song = int(selected_song[0])
    playlistbox.delete(selected_song)
Пример #20
0
from tkinter import *
from PIL import ImageTk, Image
from tkinter import ttk
from ttkthemes import ThemedTk

# ======================================Defining Main Window=====================================================
root = ThemedTk(theme='radiance')
root.title('Attendance System')
root.iconbitmap('icon.ico')
root.geometry('800x650')

# defining frames

titleFrame = ttk.Frame(root, width='800', height='50')
titleFrame.pack(side=TOP)

middleFrame = ttk.Frame(root, width='800', height='100')
middleFrame.place(x=0, y=50)

canvasFrame = ttk.Frame(root, width='800', height='395')
canvasFrame.place(x=0, y=150)

bottomFrame = ttk.Frame(root, width='800', height='100')
bottomFrame.pack(side=BOTTOM)

# ---------------------------------------------- in top frame-------------------------------------------------

titleName = ttk.Label(titleFrame,
                      text='ATTENDANCE THROUGH FACIAL RECOGNITION',
                      font=('Times New Roman', 20, 'bold'))
titleName.place(x=65, y=20)
Пример #21
0
    output_dir.set(
        askdirectory(initialdir=curr_dir, title="Select output path"))


logger = logger_init()

curr_dir = os.getcwd()
logger.debug(curr_dir)
root = ThemedTk(
    theme="breeze"
)  # themes: https://ttkthemes.readthedocs.io/en/latest/themes.html
root.title(NAME)

if platform.system(
) == "Windows":  # pq no linux nao consegue utilizar esse comando
    root.iconbitmap(BUILD_ICON_PATH)

user = StringVar()
password = StringVar()
filename = StringVar()
filename.set("No file selected")
output_dir = StringVar()
output_dir.set("No folder selected")

CREDENTIALS_FILE_PATH = f"{os.getenv('APPDATA')}/Iposim Automator/credentials.json"
KEY_FILE_PATH = f"{os.getenv('APPDATA')}/Iposim Automator/key.key"

key = get_key(KEY_FILE_PATH)

load_credentials(credentials_file_path=CREDENTIALS_FILE_PATH,
                 key=key,
Пример #22
0
def vrt():
    nsc = ThemedTk(theme="arc")
    nsc.title("vote_status")
    nsc.iconbitmap("gov2.ico")
    l=ttk.Label(nsc,text="Party Name:\t\t\tNumber of Vote",font={"10"})
    l.grid(row=0,column=0,sticky=W)

    l1=ttk.Label(nsc)
    l2 = ttk.Label(nsc)
    l3 = ttk.Label(nsc)
    l4 = ttk.Label(nsc)
    l5 = ttk.Label(nsc)
    l6 = ttk.Label(nsc)
    l7 = ttk.Label(nsc)
    l8 = ttk.Label(nsc)
    l9 = ttk.Label(nsc)
    l10 = ttk.Label(nsc)
    l11= ttk.Label(nsc)
    l12 = ttk.Label(nsc)
    l13 = ttk.Label(nsc)
    l14 = ttk.Label(nsc)
    l15 = ttk.Label(nsc)

    c = sqlite3.connect("votebox.db",check_same_thread=False)
    tc = c.execute("SELECT a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15 from votebox")
    a1=0
    a2=0
    a3=0
    a4=0
    a5=0
    a6=0
    a7=0
    a8=0
    a9=0
    a10=0
    a11=0
    a12=0
    a13=0
    a14=0
    a15=0
    for item in tc:
        if str(item[0])=="1":
            a1+=1
            l1["text"]="Bibeksheel Sajha Party "+"\t\t\t\t\t"+str(a1)
        if str(item[1])=="1":
            a2+=1
            l2["text"]="Federal Socialist Forum"+"\t\t\t\t"+str(a2)
        if str(item[2])=="1":
            a3+=1
            l3["text"]="Rastriya Janamorcha"+"\t\t\t\t"+str(a3)
        if str(item[3])=="1":
            a4+=1
            l4["text"]="Rastriya Prajatantra Party "+"\t\t\t"+str(a4)
        if str(item[4])=="1":
            a5+=1
            l5["text"]="Naya Shakti Party"+"\t\t\t\t"+str(a5)
        if str(item[5])=="1":
            a6+=1
            l6["text"]="Bahujan Shakti Party "+"\t\t\t\t"+str(a6)
        if str(item[6])=="1":
            a7+=1
            l7["text"]="Communist Party of Nepal (Marxist–Leninist)"+"\t\t"+str(a7)
        if str(item[7])=="1":
            a8+=1
            l8["text"]="Communist Party of Nepal (Unified Marxist–Leninist)"+"\t\t"+str(a8)
        if str(item[8])=="1":
            a9+=1
            l9["text"]="Nepal Pariwar Dal "+"\t\t\t\t\t"+str(a9)
        if str(item[9])=="1":
            a10+=1
            l10["text"]="Nepal Federal Socialist Party "+"\t\t\t"+str(a10)
        if str(item[10]) == "1":
            a11 += 1
            l11["text"] = "Nepali Congress  " + "\t\t\t\t\t" + str(a11)
        if str(item[11]) == "1":
            a12 += 1
            l12["text"] = "Nepali Janata Dal" + "\t\t\t\t\t" + str(a12)
        if str(item[12]) == "1":
            a13 += 1
            l13["text"] = "Rastriya Janamukti Party" + "\t\t\t\t" + str(a13)
        if str(item[13]) == "1":
            a14 += 1
            l14["text"] = "Rastriya Janata Party " + "\t\t\t\t" + str(a14)
        if str(item[14]) == "1":
            a15 += 1
            l15["text"] = "Rastriya Prajatantra Party (United) " + "\t\t" + str(a15)




    l1.grid(row=1,column=0,sticky=NSEW)
    l2.grid(row=2, column=0, sticky=NSEW)
    l3.grid(row=3, column=0, sticky=NSEW)
    l4.grid(row=4, column=0, sticky=NSEW)
    l5.grid(row=5, column=0, sticky=NSEW)
    l6.grid(row=6, column=0, sticky=NSEW)
    l7.grid(row=7, column=0, sticky=NSEW)
    l8.grid(row=8, column=0, sticky=NSEW)
    l9.grid(row=9, column=0, sticky=NSEW)
    l10.grid(row=10, column=0, sticky=NSEW)
    l11.grid(row=11, column=0, sticky=NSEW)
    l12.grid(row=12, column=0, sticky=NSEW)
    l13.grid(row=13, column=0, sticky=NSEW)
    l14.grid(row=14, column=0, sticky=NSEW)
    l15.grid(row=15, column=0, sticky=NSEW)
    nsc.mainloop()
from PIL import ImageTk, Image
import requests
import urllib.parse
import io
import time
from tkinter import filedialog
import os
import threading


root = ThemedTk(theme="radiance")
root.title("Youtbe video downloader")
root.geometry('670x340')
root.maxsize(670, 340)
root.minsize(670, 340)
root.iconbitmap('images/youtube-downloader.ico')
root.configure(bg='#100E17')

text = tk.Label(root, text="Download Video and Audio from YouTube",
                font='Helvetica 15 bold', bg="#100E17", fg="white")
text.pack()

status = tk.Label(root, text="Status bar", font='Helvetica 10',
                  relief='sunken', anchor="w",bg="#312D3C",fg="white")
status.pack(side="bottom", fill='x')

# Creating threads


def threadButtonOne():
    threading.Thread(target=download_yt_file).start()
import cv2
import pyautogui
import numpy as np
import pytesseract
from tkinter import Tk, ttk, Button, Text
from ttkthemes import ThemedTk


janela = ThemedTk(theme='radiance')
janela.title('Captura de texto em imagens')
janela.iconbitmap('screenshot.ico')



def screenshot_cut():
    im = pyautogui.screenshot()
    im = cv2.cvtColor(np.array(im),
                        cv2.COLOR_RGB2BGR)
    roi = cv2.selectROI(im)
    im_cropped = im[int(roi[1]):int(roi[1]+roi[3]),
                    int(roi[0]):int(roi[0]+roi[2])]
    cv2.imshow('cropped', im_cropped)
    cv2.destroyAllWindows()
    
    pytesseract.pytesseract.tesseract_cmd = "C:\Program Files\Tesseract-OCR\Tesseract.exe"
    config_pytesseract = r'--oem 3 --psm 6'
    resultado = pytesseract.image_to_string(im_cropped, config=config_pytesseract, lang='por')
    texto_da_imagem.configure(state='normal')
    texto_da_imagem.delete('1.0', 'end')
    texto_da_imagem.insert('1.0', resultado)
    copiar_texto.configure(state='normal')
def min(item):
    global party

    scc = ThemedTk(theme="arc")
    scc.title("ballot_page")
    scc.attributes('-fullscreen', True)
    scc.iconbitmap("gov2.ico")

    f1 = Frame(scc, height=123, width=2000, bg="#8fb7f7")
    c = Canvas(f1, width=120, height=100)

    def counter():
        tim = 30
        while 1:

            la = Label(scc, fg="red", font="10")
            timeformat = "Time remain: 00:{:02d}".format(tim)
            la["text"] = timeformat
            time.sleep(1)
            tim -= 1
            la.place(relx=0.45, rely=0.08)
            if tim == -1:
                messagebox.askokcancel(
                    message="Time Expired!\nPlease try later.")
                scc.destroy()

    th = threading.Thread(target=counter)
    th.daemon = True
    th.start()

    pd = item[7]
    with open("np.png", "wb") as fptr:
        fptr.write(base64.b64decode(item[7]))
    i = Image.open("np.png")
    i.thumbnail((120, 105))
    i.save("n.png")
    m = Image.open("n.png")
    k = ImageTk.PhotoImage(m)
    # c.create_image(image=k)

    gov2 = PhotoImage(file="gov2.png")
    gov1 = PhotoImage(file="gov1.png")
    l1 = Label(scc, image=gov2)
    l2 = Label(scc, image=gov1)
    f2 = Frame(scc, height=1000, width=1000, bg="#8fb7f7")

    l3 = Label(f1, bg="#8fb7f7")
    l4 = Label(f1, bg="#8fb7f7")
    l5 = Label(f1, bg="#8fb7f7")
    b117 = Button(image=k, bg="#8fb7f7")
    b117.place(relx=0.9, rely=0.135)

    l3["text"] = "Voter ID: " + str(item[9])
    l4["text"] = "Citizen ID Number: " + str(item[8])
    l5["text"] = "Name: " + item[0]
    l6 = Label(scc, fg="red", font="10")
    l6["text"] = "Party Selected: None"

    p1 = PhotoImage(file="1.png")
    p2 = PhotoImage(file="2.png")
    p3 = PhotoImage(file="3.png")
    p4 = PhotoImage(file="4.png")
    p5 = PhotoImage(file="5.png")
    p6 = PhotoImage(file="6.png")
    p7 = PhotoImage(file="7.png")
    p8 = PhotoImage(file="8.png")
    p9 = PhotoImage(file="9.png")
    p10 = PhotoImage(file="10.png")
    p11 = PhotoImage(file="11.png")
    p12 = PhotoImage(file="12.png")
    p13 = PhotoImage(file="13.png")
    p14 = PhotoImage(file="14.png")
    p15 = PhotoImage(file="15.png")

    def ff1(*args):
        global party
        party = 1
        l6["text"] = "Party Selected: " + str("Bibeksheel Sajha Party ")

    def ff2(*args):
        global party
        party = 2
        l6["text"] = "Party Selected: " + str("Federal Socialist Forum")

    def ff3(*args):
        global party
        party = 3
        l6["text"] = "Party Selected: " + str("Rastriya Janamorcha")

    def ff4(*args):
        global party
        party = 4
        l6["text"] = "Party Selected: " + str("Rastriya Prajatantra Party ")

    def ff5(*args):
        global party
        party = 5
        l6["text"] = "Party Selected: " + str("Naya Shakti Party")

    def ff6(*args):
        global party
        party = 6
        l6["text"] = "Party Selected: " + str("Bahujan Shakti Party ")

    def f7():
        global party
        party = 7
        l6["text"] = "Party Selected: " + str(
            "Communist Party of Nepal (Marxist–Leninist)")

    def f8():
        global party
        party = 8
        l6["text"] = "Party Selected: " + str(
            "Communist Party of Nepal (Unified Marxist–Leninist)")

    def f9():
        global party
        party = 9
        l6["text"] = "Party Selected: " + str("Nepal Pariwar Dal ")

    def f10():
        global party
        party = 10
        l6["text"] = "Party Selected: " + str("Nepal Federal Socialist Party ")

    def f11():
        global party
        party = 11
        l6["text"] = "Party Selected: " + str("Nepali Congress  ")

    def f12():
        global party
        party = 12
        l6["text"] = "Party Selected: " + str("Nepali Janata Dal")

    def f13():
        global party
        party = 13
        l6["text"] = "Party Selected: " + str("Rastriya Janamukti Party")

    def f14():
        global party
        party = 14
        l6["text"] = "Party Selected: " + str("Rastriya Janata Party ")

    def f15():
        global party
        party = 15
        l6["text"] = "Party Selected: " + str(
            "Rastriya Prajatantra Party (United) ")

    def submit():
        try:
            global party
            msg = messagebox.askyesno(message="Are you sure want to continue?")
            if msg == True:
                client.sendvote(party, item)
                os.remove("n.png")
                scc.destroy()
            else:
                pass
        except NameError:
            messagebox.showinfo(message="One candidate must be selected.")
            pass

    b1 = ttk.Button(f2, image=p1)
    b1.bind("<Button-1>", ff1)
    b2 = ttk.Button(f2, image=p2)
    b2.bind("<Button-1>", ff2)
    b3 = ttk.Button(f2, image=p3)
    b3.bind("<Button-1>", ff3)
    b4 = ttk.Button(f2, image=p4, command=ff4)
    b5 = ttk.Button(f2, image=p5, command=ff5)
    b6 = ttk.Button(f2, image=p6, command=ff6)
    b7 = ttk.Button(f2, image=p7, command=f7)
    b8 = ttk.Button(f2, image=p8, command=f8)
    b9 = ttk.Button(f2, image=p9, command=f9)
    b10 = ttk.Button(f2, image=p10, command=f10)
    b11 = ttk.Button(f2, image=p11, command=f11)
    b12 = ttk.Button(f2, image=p12, command=f12)
    b13 = ttk.Button(f2, image=p13, command=f13)
    b14 = ttk.Button(f2, image=p14, command=f14)
    b15 = ttk.Button(f2, image=p15, command=f15)

    b1.grid(row=0, column=1, padx=20, pady=20)
    b2.grid(row=0, column=2, padx=20, pady=20)
    b3.grid(row=0, column=3, padx=20, pady=20)
    b4.grid(row=0, column=4, padx=20, pady=20)
    b5.grid(row=0, column=5, padx=20, pady=20)
    b6.grid(row=1, column=1, padx=20, pady=20)
    b7.grid(row=1, column=2, padx=20, pady=20)
    b8.grid(row=1, column=3, padx=20, pady=20)
    b9.grid(row=1, column=4, padx=20, pady=20)
    b10.grid(row=1, column=5, padx=20, pady=20)
    b11.grid(row=2, column=1, padx=20, pady=20)
    b12.grid(row=2, column=2, padx=20, pady=20)
    b13.grid(row=2, column=3, padx=20, pady=20)
    b14.grid(row=2, column=4, padx=20, pady=20)
    b15.grid(row=2, column=5, padx=20, pady=20)

    f4 = Frame(scc, height=50, width=2000, bg="#8fb7f7")
    sub = ttk.Button(scc, text="Submit", command=submit)

    l1.place(relx=0.92, rely=0.001)
    l2.place(relx=0.01, rely=0.01)
    f1.place(relx=0, rely=0.125)
    f2.place(relx=0.24, rely=0.3)
    l4.place(relx=0.02, rely=0.1)
    l3.place(relx=0.047, rely=0.25)
    l5.place(relx=0.052, rely=0.4)
    l6.place(relx=0.24, rely=0.837)
    f4.place(relx=0, rely=0.87)
    sub.place(relx=0.71, rely=0.88)

    scc.mainloop()
Пример #26
0
    conf["GENERAL"] = {
        "show_location": show_location.get(),
        "autostart_presence": autostart_presence.get(),
        "selected_char": selected_char.get(),
    }

    with open("settings.ini", "w") as config:
        conf.write(config)


presence = pypresence.Presence(client_id)

tk = ThemedTk("EVE Online - Discord Presence", theme="arc")
tk.title("EVE Online - Discord Presence")
try:
    tk.iconbitmap("icon.ico")
except:
    pass
tk.geometry("350x150")

frame = Frame(tk)

run_loop = False
user = getpass.getuser()
log_location = f"C:\\Users\\{user}\\Documents\\EVE\\logs\\Gamelogs"
show_location = BooleanVar(frame,
                           value=conf.getboolean("GENERAL", "show_location"))
autostart_presence = BooleanVar(frame,
                                value=conf.getboolean("GENERAL",
                                                      "autostart_presence"))
selected_char = StringVar(frame, value=conf.get("GENERAL", "selected_char"))
import os
from imutils import paths
from datetime import datetime
from ttkthemes import ThemedTk
import shutil

#initialize the model
Recognize = recognize(0.5, 0.8)
#initialize the embedding model
extractEmbed = extract_embeddings()

#Set up GUI
#window = tk.Tk()  #Makes main window
window = ThemedTk(theme="equilux")
window.title("Facial Recognition Surveillance System")
window.iconbitmap("logo3_icon.ico")
window.config(background="#292929")  #"#121212")#"#242424")
#print(window.style)
#style.configure("BW.TLabel", foreground="black", background="white")
#window.config(background="#FFFFFF")
#window.bind('<<ThemeChanged>>', lambda event: print('theme changed in root and across all widgets!'))
'''
Style = ttk.Style()
print(Style.theme_use())

Style.theme_use("clam")
print(Style.theme_use())
'''
#print(ttk.Style().theme_names())
style = ttk.Style()
style.theme_use("equilux")
Пример #28
0
    q13 = ttk.Frame(home)
    q14 = ttk.Frame(home)
    q15 = ttk.Frame(home)
    final = ttk.Frame(home)
    enter_name = ttk.Frame(home)
    signup = ttk.Frame(home)
    dashboard = ttk.Frame(home)
    admin_panel = ttk.Frame(home)
    edit_question = ttk.Frame(home)
    edit_question2 = ttk.Frame(home)
    add_question = ttk.Frame(home)
    delete_question = ttk.Frame(home)

    #frames declaration end -->
    try:
        home.iconbitmap("Assets/logo.ico")
    except:
        pass
    home.resizable(False, False)

    #<--timer frame
    timerframe = ttk.Frame(home)
    timerframe.grid(row=1, column=0, sticky='news')
    #timer frame End-->

    #info frame
    ttk.Label(info, text="Trivia Quiz", font="helveta 40 bold").pack(pady=10)
    ttk.Label(info, text="Version: 2.1 Beta", font="helveta 8 bold").pack()

    ttk.Button(info, text='Return to Mainmenu',
               command=back_to_menu).pack(side=BOTTOM, pady=10)
Пример #29
0
# pip install ttktheme
# Tuesday, July 19, 2020
# By RΨST-4M 🚀
# EightSoft Academy

from tkinter import *
from tkinter import messagebox
from tkinter import ttk  # Normal Tkinter.* widgets are not themed!
from ttkthemes import ThemedTk

root = ThemedTk(theme="breeze")
root.title("Menu Bar")
root.iconbitmap('examples/photos/icon.ico')
root.geometry("400x400")

# Crate a Menu
my_menu = Menu(root)
root.config(menu=my_menu)


# Create a functions for commands
def command_new():
    """When you press File->New ... the following function code will work"""
    ttk.Label(root, text="You Clicked New ...").pack()


def command_cut():
    ttk.Label(root, text="Awesome, it is working!").pack()


def question():
Пример #30
0
from pygame import mixer
import tkinter.messagebox  #messagae imported from tkinter
from tkinter import filedialog  #filedialog import from tkinter
from mutagen.mp3 import MP3
from tkinter import ttk

from tkinter import ttk  # Normal Tkinter.* widgets are not themed!
from ttkthemes import ThemedTk
import threading
import time
root = ThemedTk(theme="")  # making instance of tkinter as Tk()
mixer.init()  # initializing mixer

root.title("moody")  # setting title

root.iconbitmap(r'image/music.ico')  # setting icon
displayFileName = ttk.Label(root,
                            text="Welcome to my music player",
                            font="arial 20 bold")
displayFileName.pack()  # packing text
topframe = Frame(root)
topframe.pack(pady=10, padx=20)
length_label = ttk.Label(
    topframe, text="Total length --:--",
    font="verdena 10 bold")  # setting label in widget using Label()
length_label.grid(row=0, column=0, padx=20)
current_time_label = ttk.Label(topframe,
                               text="Current time -  --:--",
                               font="verdena 10 bold")
current_time_label.grid(row=0, column=1)
play = PhotoImage(