예제 #1
0
def main():
    print(
        "===================================================================")
    print("             Selamat Datang Di Aplikasi GGG	(Guna Ga Guna)")
    print(
        "===================================================================")
    print("                                 Semua Tugas              ")
    print("1. Buat Tugas Baru")
    print("2. Kembali Ke Home")
    print("0. Keluar            ")
    print(
        "======================================================================"
    )

    pilih = str(input("Pilihan anda : #"))

    if pilih == "1":
        tugas()
    elif pilih == "2":
        time.sleep(1)
        home.main()
    elif pilih == "0":
        exit()
    else:
        print("Jangan asal ngetik oii")
        main2()
예제 #2
0
def main3():
    pilih = str(input("Pilihan anda : #"))

    if pilih == "1":
        catat()
    elif pilih == "2":
        home.main()
    elif pilih == "0":
        exit()
    else:
        print("Jangan asal ngetik oii")
        main()
예제 #3
0
파일: signinui.py 프로젝트: Krist-m/www
    def signin_event(self, widget, data=None):
        res = self.__check_credentails()
        print res
        if res is not None:
            if self.mIsRememberPasswordEnabled:
                self.__store_password()
            self.window.destroy()
            import home

            home = home.HomeUI(User.create_from_list(res))
            home.main()
        else:
            print "Phone and Password not Matching"
            message = gtk.MessageDialog(type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK)
            message.set_markup("Phone number and Password did not match try to login again...")
            message.run()
            message.destroy()
예제 #4
0
파일: main.py 프로젝트: raj713335/PARIKSHA
    def progress(self):

        global counter

        # SET VALUE TO PROGRESS BAR
        self.ui.progressBar.setValue(counter)

        # CLOSE SPLASH SCREE AND OPEN APP
        if counter > 100:
            # STOP TIMER
            self.timer.stop()

            # SHOW MAIN WINDOW
            # ADD FURTHER

            from home import main
            # CLOSE SPLASH SCREEN

            self.close()
            main()
        # INCREASE COUNTER
        counter += 1
예제 #5
0
파일: index.py 프로젝트: Rana0001/help
def login():
    global conn5
    global c5
    conn5 = sqlite3.connect("registration.db")
    c5 = conn5.cursor()
    c5.execute('SELECT *,oid FROM signup_form')
    data = c5.fetchall()
    for user_data in data:
        if str(user_data[2]) == username_field.get() and str(
                user_data[3]) == password_field.get():
            try:
                messagebox.showinfo("      Login        ", "Login Successful")
                root.withdraw()
                return home.main()

            finally:
                pass
    messagebox.showinfo("    Login     ",
                        "Please! Check your email and password.",
                        parent=root)
    conn5.commit()
    conn5.close()
예제 #6
0
def main(wg=None, window=None):
    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=3, sticky="NSEW")
    Tk.Label(window, text="Wins: " + str(info.wins.get()), background="#2b2b2b", font=("Odin Rounded", 20)).grid(
        row=1, column=0, sticky="NSEW")
    Tk.Label(window, text="Losses: " + str(info.losses.get()), background="#2b2b2b", font=("Odin Rounded", 20)).grid(
        row=1, column=1, sticky="NSEW")
    Tk.Label(window, text="Games: " + str(info.games.get()), background="#2b2b2b", font=("Odin Rounded", 20)).grid(
        row=1, column=2, sticky="NSEW")

    Tk.Button(window, text="Back", font=("Odin Rounded", 20), background="#3c3f41", borderwidth=1, relief=Tk.SUNKEN,
              highlightcolor="#515151", command=lambda: home.main(window.winfo_geometry(), window)).grid(row=2,
                                                                                                         column=0,
                                                                                                         columnspan=3,
                                                                                                         sticky="NSEW")

    window.mainloop()
예제 #7
0
import home
import login
import signup

home.main(login.login, signup.signup)
예제 #8
0
def login_success(user):
    home.main(user)
예제 #9
0
import gc
import sys

import util
from util import *

rtc = machine.RTC()
appname = rtc.memory()
sys.path.append('/apps')

if appname:
    rtc.memory('')
    util.startup()
    #tim = machine.Timer(-1)
    #tim.init(period=2000, mode=machine.Timer.ONE_SHOT, callback=util.startup)
    gc.collect()
    app = __import__(appname.decode('ascii'))
    app.main()
else:  # Cold boot
    util.display_logo()
    util.startup()
    try:
        import home
        home.main()
    except Exception as e:
        print(e)
    else:
        gc.collect()
예제 #10
0
def main():
    primary.main()
예제 #11
0
def main():
    home.main()
예제 #12
0
def main(window):
    global playedx, turn, game_over
    boxes = [[box(0, 0), box(150, 0), box(300, 0)],
             [box(0, 150), box(150, 150),
              box(300, 150)], [box(0, 300),
                               box(150, 300),
                               box(300, 300)]]
    run = True
    while run:
        keys = pygame.key.get_pressed()
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                run = False
            if event.type == pygame.KEYDOWN:
                if event.key == pygame.K_m:
                    window.fill((255, 255, 255))

                    boxes = [[box(0, 0), box(150, 0),
                              box(300, 0)],
                             [box(0, 150),
                              box(150, 150),
                              box(300, 150)],
                             [box(0, 300),
                              box(150, 300),
                              box(300, 300)]]
                    turn = 0
                    playedx = False
                    game_over = False
                    home.main(window)
                    run = False
        if keys[pygame.K_r]:
            window.fill((255, 255, 255))

            boxes = [[box(0, 0), box(150, 0),
                      box(300, 0)],
                     [box(0, 150), box(150, 150),
                      box(300, 150)],
                     [box(0, 300), box(150, 300),
                      box(300, 300)]]
            turn = 0
            playedx = False
            game_over = False
        mx, my = pygame.mouse.get_pos()
        click = pygame.mouse.get_pressed()

        if not game_over:
            if mx < 150 and my < 150:
                boxes[0][0].hover = True
                if click[0] == 1:
                    boxes[0][0].played = True

            if 150 < mx < 300 and my < 150:
                boxes[0][1].hover = True
                if click[0] == 1:
                    boxes[0][1].played = True

            if 300 < mx < 450 and my < 150:
                boxes[0][2].hover = True
                if click[0] == 1:
                    boxes[0][2].played = True

            if 0 < mx < 150 and 150 < my < 300:
                boxes[1][0].hover = True
                if click[0] == 1:
                    boxes[1][0].played = True

            if 150 < mx < 300 and 150 < my < 300:
                boxes[1][1].hover = True
                if click[0] == 1:
                    boxes[1][1].played = True

            if 300 < mx < 450 and 150 < my < 300:
                boxes[1][2].hover = True
                if click[0] == 1:
                    boxes[1][2].played = True

            if 0 < mx < 150 and 300 < my < 450:
                boxes[2][0].hover = True
                if click[0] == 1:
                    boxes[2][0].played = True

            if 150 < mx < 300 and 300 < my < 450:
                boxes[2][1].hover = True
                if click[0] == 1:
                    boxes[2][1].played = True

            if 300 < mx < 450 and 300 < my < 450:
                boxes[2][2].hover = True
                if click[0] == 1:
                    boxes[2][2].played = True
        game_result(window, boxes)
        redraw(window, boxes)

        for i in range(3):
            for j in range(3):
                boxes[i][j].hover = False
예제 #13
0
def back(window, text):
    info.name.set(text.get(1.0, Tk.END))
    home.main(window.winfo_geometry(), window)