# https://www.globalsino.com/ICs/page4853.html
# Arranged layout for command functions

import pyperclip
from tkinter import *
from tkinter import messagebox
from ctypes import windll
import os
import time
import subprocess
import pyautogui
 
root = Tk()
 
#button functions
def Function1():
    x = 1+2
    print(x)
 
def Function2():
    x = 3
    print(x)
 
def Function3():
    x = 5
    print(x)
 
def Function4():
    x = 6
    print(x)
 
def Function5():
    x = 7
    print(x)
 
def Function6():
    x = 8
    print(x)
 
def Function7():
    x = 9
    print(x)
 
def Function8():
    x = 10
    print(x)
    
#create window
root.title ("Yougui Liao") #name the window
root.geometry ("800x800") #set size of gui
root.resizable(False, False) #make gui non rezibale
 
# create buttons
app = Frame(root)
app.grid()
 
button1 = Button(app, text = "Function1", bg="orange",fg="black", width=13, command=Function1)
button1.grid(row=1,column=0)
button2 = Button(app, text = "Function2", bg="orange", width=13, command=Function2)
button2.grid()
button3 = Button(app, text = "Function3", bg="orange", width=13, command=Function3)
button3.grid()
button4 = Button(app, text = "Function4", bg="orange", width=13, command=Function4)
button4.grid()
button5 = Button(app, text = "Function5", bg="orange", width=13, command=Function5 )
button5.grid()
 
#insert logo
photo = PhotoImage(file="C:\GlobalSino\images\Tested_Grey.PNG")
photo = photo.zoom(25) #with 250
photo = photo.subsample(32) #mechanically, here it is adjusted to 32 instead of 320
label = Label(image=photo)
label.image = photo # keep a reference!
label.grid(row=0,column=1)
 
#drop down menu
menubar = Menu(root)
filemenu = Menu(menubar, tearoff = 0)
 
filemenu.add_command(label="Function6", command = Function6)
filemenu.add_command(label="Function7", command = Function7)
filemenu.add_command(label="Function8", command = Function8)
filemenu.add_separator()
menubar.add_cascade(label = "File", menu = filemenu)
filemenu.add_command(label = "Exit", command = root.destroy)
root.config(menu = menubar)
 
mainloop()
