def __init__(self, master): tk.Frame.__init__(self, master, background="lightblue") #self.master.geometry("650x200") tk.Label(self, text="Node-Dashboard", bg="lightblue", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') tk.Button(self, text="Return to start page", bg="lightblue", height=1, width=20, command=lambda: master.switch_frame(StartPage)).grid( row=3, column=2, padx='0', pady='0') label1 = tk.Label(self, text=" Hornet Dashboard ", bg="lightblue", height=1, width=20).grid(row=2, column=0, padx='0', pady='0') button1 = tk.Button(self, text="Open", bg="lightblue", height=1, width=20, command=hornet_dashboard).grid(row=2, column=1, padx='0', pady='0') #####################################End of Window frames############################################
def __init__(self, master): tk.Frame.__init__(self, master, background="lightblue") #self.master.geometry("650x200") tk.Label(self, text="Informations", bg="lightblue", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') tk.Button(self, text="Return to start page", bg="lightblue", height=1, width=20, command=lambda: master.switch_frame(StartPage)).grid( row=3, column=2, padx='0', pady='0') label1 = tk.Label(self, text=" About Raspihive ", bg="lightblue", height=1, width=20).grid(row=2, column=0, padx='0', pady='0') button1 = tk.Button(self, text="About", bg="lightblue", height=1, width=20, command=about).grid(row=2, column=1, padx='0', pady='0') label2 = tk.Label(self, text="Bug Report", bg="lightblue", height=1, width=20).grid(row=3, column=0, padx='0', pady='0') button2 = tk.Button(self, text="Report", bg="lightblue", height=1, width=20, command=report).grid(row=3, column=1, padx='0', pady='0') label3 = tk.Label(self, text="Preparations", bg="lightblue", height=1, width=20).grid(row=4, column=0, padx='0', pady='0') button3 = tk.Button(self, text="Ports and FW settings", bg="lightblue", height=1, width=20, command=infopreparations).grid(row=4, column=1, padx='0', pady='0')
def __init__(self, parent, data=None, lines=None, ubis=None, image=None, pars=None, spline=None): """ Data would be your observed g-vectors. Lines will be a computed lattice """ Tk.Toplevel.__init__(self, parent) self.parent = parent if data != None: xyz = data.copy() else: xyz = numpy.array([0, 0, 0]) self.ps = Tk.StringVar() self.ps.set('1.') self.pointsize = 1. self.npeaks = xyz.shape[0] self.o = myOpengl(self, width=400, height=400, double=1) self.o.redraw = self.redraw self.o.autospin_allowed = 1 self.o.fovy = 5 self.o.near = 1e6 self.o.far = 1e-6 import math self.o.distance = 3. #numpy.maximum.reduce(numpy.ravel(xyz))*4 / \ # math.tan(self.o.fovy*math.pi/180) print(type(xyz), xyz.dtype.char, xyz.shape) self.xyz = xyz f = Tk.Frame(self) Tk.Button(f, text="Help", command=self.o.help).pack(side=Tk.LEFT) Tk.Button(f, text="Reset", command=self.o.reset).pack(side=Tk.LEFT) Tk.Button(f, text="Pointsize", command=self.setps).pack(side=Tk.LEFT) Tk.Entry(f, textvariable=self.ps).pack(side=Tk.LEFT) Tk.Button(f, text="Quit", command=self.goaway).pack(side=Tk.RIGHT) self.dataoff = 0 self.o.pack(side='top', expand=1, fill='both') f.pack(side=Tk.BOTTOM, expand=Tk.NO, fill=Tk.X) Tk.Label(self, text="Red=[1,0,0] Green=[0,1,0] Blue=[0,0,1]").pack( side=Tk.BOTTOM, expand=Tk.NO, fill=Tk.X) self.ubis = ubis self.color = numpy.ones((xyz.shape[0], 3), numpy.float) print(self.color.shape) self.tex = False if ubis is not None: self.ubis = self.readubis(ubis) self.scorecolor(0) if pars is not None: self.tex = True self.readspline(spline) self.readprms(pars) self.readimage(image) self.changedata(xyz)
def __init__(self, master): tk.Frame.__init__(self, master, background="lightblue") #self.master.geometry("650x200") tk.Label(self, text="Useful tools", bg="lightblue", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') tk.Button(self, text="Return to start page", bg="lightblue", height=1, width=20, command=lambda: master.switch_frame(StartPage)).grid( row=3, column=2, padx='0', pady='0') label1 = tk.Label(self, text=" Ping test ", bg="lightblue", height=1, width=20).grid(row=2, column=0, padx='0', pady='0') button1 = tk.Button(self, text="Ping", bg="lightblue", height=1, width=20, command=Ping_function).grid(row=2, column=1, padx='0', pady='0') label2 = tk.Label(self, text=" Mount Hornet DB to SSD", bg="lightblue", height=1, width=20).grid(row=3, column=0, padx='0', pady='0') button2 = tk.Button(self, text="mount", bg="lightblue", height=1, width=20, command=mounthornetDBtoextDrive).grid(row=3, column=1, padx='0', pady='0')
def main(wg=None, window=None): conn = connection() conn.join() if wg is None: window = Tk.Tk() window.title(info.windowName) window.geometry("600x492") window.iconbitmap(default="data/img.ico") window.configure(background="#2b2b2b") window.resizable(False, False) else: window.destroy() window = Tk.Tk() window.title(info.windowName) window.geometry(wg) window.iconbitmap(default="data/img.ico") window.configure(background="#2b2b2b") window.resizable(False, False) img = Image.open("data/img.png") img = img.resize((600, 400), Image.ANTIALIAS) img = ImageTk.PhotoImage(img) Tk.Label(window, image=img, background="#2b2b2b").grid(row=0, column=0, columnspan=2, sticky="NSEW") d1img = ImageTk.PhotoImage(connection.teams["d1"][1]) d2img = ImageTk.PhotoImage(connection.teams["d2"][1]) jimg = ImageTk.PhotoImage(connection.teams["j"][1]) Tk.Label(window, image=d1img, background="#2b2b2b").grid(row=1, column=0, sticky="NSEW") Tk.Label(window, text="Drawer 1: " + connection.teams["d1"][0], background="#2b2b2b", font=("Odin Rounded", 20)).grid( row=1, column=1, sticky="NSEW") Tk.Label(window, image=d2img, background="#2b2b2b").grid(row=2, column=0, sticky="NSEW") Tk.Label(window, text="Drawer 2: " + connection.teams["d2"][0], background="#2b2b2b", font=("Odin Rounded", 20)).grid( row=2, column=1, sticky="NSEW") Tk.Label(window, image=jimg, background="#2b2b2b").grid(row=3, column=0, sticky="NSEW") Tk.Label(window, text="Judge: " + connection.teams["j"][0], background="#2b2b2b", font=("Odin Rounded", 20)).grid( row=3, column=1, sticky="NSEW") window.update() window.mainloop()
from tkinter import Tk, Frame, BOTH from PIL import Image, ImageTk k = cv2.waitKey(10) & 0xFF song = pyglet.media.load('instructions.mp3') root = Tk() root.title("ASL Translator Application") im = Image.open('ASL.jpg') tkimage = ImageTk.PhotoImage(im) myvar = Tk.Label(root, image=tkimage) myvar.place(relx=0.5, rely=0.735, anchor=CENTER) # Shell Scripting Command Execution -------------------------------------------------------------------------------- cmd = "ultimate.sh" def call_back(): print("Button Pressed!") song.play() # pyglet.app.run() def final_callback(): """
def __init__(self, master): tk.Frame.__init__(self, master, background="lightblue") #self.master.geometry("650x200") tk.Label(self, text="Update menu", bg="lightblue", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') tk.Button(self, text="Return to start page", bg="lightblue", height=1, width=20, command=lambda: master.switch_frame(StartPage)).grid( row=3, column=2, padx='0', pady='0') """ tk.Label(self, text="Update OS").grid(row=1, column=0, padx='0', pady='0') tk.Button(self, text="update", command=lambda: master.switch_frame(StartPage)).grid(row=1, column=1, padx='0', pady='0') """ label1 = tk.Label(self, text="Update OS", bg="lightblue", height=1, width=20).grid(row=2, column=0, padx='0', pady='0') button1 = tk.Button(self, text="OS-update", bg="lightblue", height=1, width=20, command=update_os_function).grid(row=2, column=1, padx='0', pady='0') label2 = tk.Label(self, text="Update packages", bg="lightblue", height=1, width=20).grid(row=3, column=0, padx='0', pady='0') button2 = tk.Button(self, text="P-update", bg="lightblue", height=1, width=20, command=update_packages_function).grid(row=3, column=1, padx='0', pady='0') label3 = tk.Label(self, text="Update Hornet Node", bg="lightblue", height=1, width=20).grid(row=4, column=0, padx='0', pady='0') button3 = tk.Button(self, text="H-update", bg="lightblue", height=1, width=20, command=update_hornet_node).grid(row=4, column=1, padx='0', pady='0') label4 = tk.Label(self, text="Update Raspihive", bg="lightblue", height=1, width=20).grid(row=5, column=0, padx='0', pady='0') button4 = tk.Button(self, text="R-update", bg="lightblue", height=1, width=20, command=update_raspihive).grid(row=5, column=1, padx='0', pady='0')
def __init__(self, master): tk.Frame.__init__(self, master, background="lightblue") #self.master.geometry("650x200") tk.Label(self, text="This is page five", bg="lightblue", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') tk.Button(self, text="Return to start page", bg="lightblue", height=1, width=20, command=lambda: master.switch_frame(StartPage)).grid( row=3, column=2, padx='0', pady='0') label1 = tk.Label(self, text=" Start hornet node ", bg="lightblue", height=1, width=20).grid(row=2, column=0, padx='0', pady='0') button1 = tk.Button(self, text="Start hornet node", bg="lightblue", height=1, width=20, command=start_h_function).grid(row=2, column=1, padx='0', pady='0') label2 = tk.Label(self, text=" Stop hornet node ", bg="lightblue", height=1, width=20).grid(row=3, column=0, padx='0', pady='0') button2 = tk.Button(self, text="Stop hornet node", bg="lightblue", height=1, width=20, command=stop_h_function).grid(row=3, column=1, padx='0', pady='0') label3 = tk.Label(self, text=" Restart hornet node ", bg="lightblue", height=1, width=20).grid(row=4, column=0, padx='0', pady='0') button3 = tk.Button(self, text="Restart hornet node", bg="lightblue", height=1, width=20, command=restart_h_function).grid(row=4, column=1, padx='0', pady='0') label4 = tk.Label(self, text=" Check hornet status ", bg="lightblue", height=1, width=20).grid(row=5, column=0, padx='0', pady='0') button4 = tk.Button(self, text="Check hornet status", bg="lightblue", height=1, width=20, command=status_h_function).grid(row=5, column=1, padx='0', pady='0') label5 = tk.Label(self, text=" Watch the logs ", bg="lightblue", height=1, width=20).grid(row=6, column=0, padx='0', pady='0') button5 = tk.Button(self, text="Watch the logs", bg="lightblue", height=1, width=20, command=logs_h_function).grid(row=6, column=1, padx='0', pady='0') label6 = tk.Label(self, text=" Remove the mainnetdb ", bg="lightblue", height=1, width=20).grid(row=7, column=0, padx='0', pady='0') button6 = tk.Button(self, text="Remove the mainnnetdb", bg="lightblue", height=1, width=20, command=mainnetdb_h_function).grid( row=7, column=1, padx='0', pady='0')
def __init__(self, master): tk.Frame.__init__(self, master, background="lightyellow") #self.master.geometry("600x200") tk.Label(self, text="Main Page", bg="lightyellow", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') # For page one tk.Button(self, text="Update menu", bg="lightyellow", height=1, width=20, command=lambda: master.switch_frame(PageOne)).grid(row=1, column=0, padx='10', pady='0') # For page two tk.Button(self, text="Install menu", bg="lightyellow", height=1, width=20, command=lambda: master.switch_frame(PageTwo)).grid(row=1, column=1, padx='10', pady='0') # For page three tk.Button(self, text="Tools", bg="lightyellow", height=1, width=20, command=lambda: master.switch_frame(PageThree)).grid( row=3, column=0, padx='10', pady='0') # For page four tk.Button(self, text="Help", bg="lightyellow", height=1, width=20, command=lambda: master.switch_frame(PageFour)).grid( row=3, column=1, padx='10', pady='0') # For page five tk.Button(self, text="Node control", bg="lightyellow", height=1, width=20, command=lambda: master.switch_frame(PageFive)).grid( row=2, column=0, padx='10', pady='0') # For page Dashboard Access tk.Button(self, text="Dashboard Access", bg="lightyellow", height=1, width=20, command=lambda: master.switch_frame(PageSix)).grid(row=2, column=1, padx='10', pady='0')
def __init__(self, master): tk.Frame.__init__(self, master, background="lightblue") #self.master.geometry("650x200") tk.Label(self, text="Install menu", bg="lightblue", height=1, width=20).grid(row=0, column=0, padx='0', pady='0') tk.Button(self, text="Return to start page", bg="lightblue", height=1, width=20, command=lambda: master.switch_frame(StartPage)).grid( row=3, column=2, padx='0', pady='0') label1 = tk.Label(self, text="Install Hornet-Node", bg="lightblue", height=1, width=20).grid(row=2, column=0, padx='0', pady='0') button1 = tk.Button(self, text="Install Hornet", bg="lightblue", height=1, width=20, command=Hornet_install_function).grid(row=2, column=1, padx='0', pady='0') label1u = tk.Label(self, text="Uninstall Hornet-Node", bg="lightblue", height=1, width=20).grid(row=2, column=2, padx='0', pady='0') button1u = tk.Button(self, text="Uninstall Hornet", bg="lightblue", height=1, width=20, command=Hornet_uninstall_function).grid(row=2, column=2, padx='0', pady='0') label2 = tk.Label(self, text="Install Bee-Node", bg="lightblue", height=1, width=20).grid(row=3, column=0, padx='0', pady='0') button2 = tk.Button(self, text="Install Bee", bg="lightblue", height=1, width=20, command=Bee_install_function).grid(row=3, column=1, padx='0', pady='0') label3 = tk.Label(self, text="Install rev. proxy + ssl", bg="lightblue", height=1, width=20).grid(row=4, column=0, padx='0', pady='0') button3 = tk.Button(self, text="install RP + SSL", bg="lightblue", height=1, width=20, command=SSL_reverse_proxy_install_function).grid( row=4, column=1, padx='0', pady='0')