Exemplo n.º 1
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.window.protocol("WM_DELETE_WINDOW", self.noClose)
        self.parent = parent
        self.tags = deepcopy(parent.tags)

        self.frame = Frame(self.window)
        self.frame.grid(row=0, sticky=NSEW, padx=4, pady=4)

        labelPleaseWait = Label(self.frame,
                                text=MessageConstants.UPDATING_TWITCH_TAGS)
        labelPleaseWait.grid(row=0, sticky=NSEW, padx=4, pady=4)

        WindowHelper.initializeWindow(self.window, self.parent, 300, 100, 30,
                                      50, LabelConstants.UPDATE_IN_PROGRESS)

        self.window.deiconify()
        self.parent.window.attributes('-disabled', 0)
        self.parent.window.deiconify()
        self.window.update()

        beforeLen = len(self.tags)
        self.tags = updateTwitchTags(self.parent.parent.credentials.oauth,
                                     self.tags, True)
        afterLen = len(self.tags)
        messagebox.showinfo(
            LabelConstants.UPDATE_COMPLETE,
            MessageConstants.TAGS_ADDED.format(afterLen - beforeLen))
        self.parent.tags = self.tags
        self.window.destroy()
Exemplo n.º 2
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent

        self.frame = Frame(self.window)
        self.gridFrames()

        WindowHelper.initializeWindow(self.window, self.parent, 360, 142, 240,
                                      290, "How To Play")
        self.populateFrame()
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 3
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent

        self.frameTop = Frame(self.window)
        self.aboutImage = PhotoImage(file=FileConstants.STREAMOPENER_ICON_64)

        WindowHelper.initializeWindow(self.window, self.parent, 0, 0, 60, 100,
                                      LabelConstants.ABOUT)
        self.addAboutFrame()
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 4
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent

        self.frame = Frame(self.window)
        self.gridFrames()

        WindowHelper.initializeWindow(self.window, self.parent, 260, 70, 284,
                                      320, "Draw pile exhausted.")
        self.populateFrame()
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 5
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent
        self.teamName = StringVar()

        self.entryFrame = Frame(self.window)
        self.buttonFrame = Frame(self.window)

        WindowHelper.initializeWindow(self.window, self.parent, 260, 106, 30,
                                      50, LabelConstants.TEAM_NAME_WINDOW)
        self.gridFrames()
        self.addEntryFrame()
        self.addButtonFrame()
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 6
0
    def __init__(self, parent, filters):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent
        self.filters = deepcopy(filters)
        self.filterFrame = Frame(self.window)
        self.buttonFrame = Frame(self.window)

        self.filterGameListbox = None
        self.filterStreamListbox = None
        self.filterCombinedListbox = None

        WindowHelper.initializeWindow(self.window, self.parent, 460, 630, 30, 50, LabelConstants.FILTER_WINDOW)
        self.gridFrames()
        self.addFilterListbox()
        self.addButtons()
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 7
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.window.protocol("WM_DELETE_WINDOW", self.noClose)
        self.parent = parent

        self.frame = Frame(self.window)
        self.frame.grid(row=0, sticky=NSEW, padx=4, pady=4)

        labelPleaseWait = Label(self.frame,
                                text=MessageConstants.UPDATING_STREAMS)
        labelPleaseWait.grid(row=0, sticky=NSEW, padx=4, pady=4)

        WindowHelper.initializeWindow(self.window, self.parent, 300, 100, 30,
                                      50, LabelConstants.UPDATE_IN_PROGRESS)

        self.window.deiconify()
        self.parent.window.attributes('-disabled', 0)
        self.parent.window.deiconify()
        self.window.update()
Exemplo n.º 8
0
    def __init__(self, parent, teams):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent
        self.teams = deepcopy(teams)
        self.teamFrame = Frame(self.window)
        self.streamFrame = Frame(self.window)
        self.buttonFrame = Frame(self.window)

        self.isRename = False
        self.tempName = None
        self.currentTeam = None
        self.teamsExist = False
        self.pageLoaded = False

        self.comboboxTeam = None
        self.freeAgentListbox = None
        self.teamMemberListbox = None

        self.selectedFreeAgents = None
        self.selectedTeamMembers = None

        self.buttonLeftArrow = None
        self.buttonUpArrow = None
        self.buttonDownArrow = None
        self.buttonRightArrow = None
        self.buttonRename = None

        WindowHelper.initializeWindow(self.window, self.parent, 380, 282, 30, 50, LabelConstants.TEAM_WINDOW)
        self.gridFrames()
        self.addDropdown()
        self.addFreeAgentListbox()
        self.addListboxButtons()
        self.addTeamMemberListbox()
        self.addButtons()
        if self.teamsExist:
            self.switchActiveTeam()
        self.pageLoaded = True
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 9
0
    def __init__(self, card1: Card, card2: Card, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.card1 = card1
        self.card2 = card2
        self.parent = parent

        self.frame = Frame(self.window)
        self.gridFrames()
        self.labelAsc = Label(self.frame,
                              image=self.card1.image,
                              text="Ascending",
                              compound=TOP)
        self.labelDesc = Label(self.frame,
                               image=self.card2.image,
                               text="Descending",
                               compound=TOP)
        self.labels = None

        WindowHelper.initializeWindow(self.window, self.parent, 196, 160, 322,
                                      270, "Select pile to play on.")
        self.addCards()
        WindowHelper.finalizeWindow(self.window, self.parent)
Exemplo n.º 10
0
    def __init__(self, parent):
        self.window = Toplevel(parent.window)
        self.window.withdraw()
        self.parent = parent
        self.tags = deepcopy(parent.tags)
        self.activeFrame = Frame(self.window)
        self.upDownButtonFrame = Frame(self.window)
        self.inactiveFrame = Frame(self.window)
        self.okCancelFrame = Frame(self.window)

        self.selectedActive = None
        self.selectedInactive = None

        self.activeListbox = None
        self.inactiveListbox = None

        WindowHelper.initializeWindow(self.window, self.parent, 460, 514, 30, 50, LabelConstants.TAG_WINDOW)
        self.gridFrames()
        self.addActiveListbox()
        self.addMoveButtons()
        self.addInactiveListbox()
        self.addOkCancelButtons()
        self.populateListboxes()
        WindowHelper.finalizeWindow(self.window, self.parent)