def logged_in_mode(self):
     Menu()
     core.delete_item("Login Window")
     core.add_tab_bar(name="tab_bar", parent="Main Window")
     Tab("Workout", "tab_bar").generate_tab()
     Tab("Records", "tab_bar").generate_tab()
     simple.show_item("Main Menu")
Beispiel #2
0
    def ShowWindow(self, duplicates_list):

        self._duplicates_list = duplicates_list

        simple.show_item(self._window_name)

        self._render_results_window()
Beispiel #3
0
 def compose_workout(self):
     equipment_val = core.get_value("Equipment##widget")
     exercise_type_val = core.get_value("Exercise Type##widget")
     muscle_group_val = core.get_value("Muscle Group##widget")
     if not equipment_val or not exercise_type_val or not muscle_group_val:
         simple.show_item("Fill all the inputs, please.")
     else:
         simple.hide_item("workout_composition_group")
         self._composed_workout = workout_services.get_composed_workout(
             equipment_val, exercise_type_val, muscle_group_val)
         core.add_group(name="buttons", parent="workout_execution_group")
         core.add_table(
             "workout_table",
             ["Exercise", "Sets", "Reps", "Example"],
             parent="workout_execution_group",
             callback=self.toggle,
         )
         for workout in self._composed_workout:
             core.add_row("workout_table", list(workout.values()))
         core.add_button("Cancel##widget",
                         callback=self.cancel_workout,
                         parent="buttons")
         core.add_button("Clear##widget",
                         callback=self.clear_table,
                         parent="buttons")
         core.add_button("Save##widget",
                         callback=self.save_workout,
                         parent="buttons")
Beispiel #4
0
 def cancel_workout(self):
     if core.does_item_exist("example_image"):
         core.delete_item("example_image")
     core.delete_item("buttons")
     core.delete_item("workout_table")
     simple.show_item("workout_composition_group")
     if core.get_value("Results successfully saved"):
         core.delete_item("Results successfully saved")
     if core.get_value("Error happened while saving the result"):
         core.delete_item("Results successfully saved")
Beispiel #5
0
def switch_back_to_menu():
    logging.info("Switch back to start menu")
    global start_threading
    start_threading = 0
    hwnd = win32gui.GetForegroundWindow()
    win32gui.MoveWindow(hwnd, 0, 0, 492, 830, True)
    simple.show_item("##Overlay")
    simple.show_item("##Config")
    faceit_name = config_functions.get_faceit_name_from_db()
    core.delete_item(f"{faceit_name} Elo")
    win32gui.SetWindowText(hwnd, "FACEIT Elo Overlay")
 def log_in(self):
     username = core.get_value("Username##login")
     password = core.get_value("Password##login")
     if not username or not password:
         simple.show_item("Please, fill all the inputs")
         return
     result = user_services.login_user(username, password)
     if result:
         self.logged_in_mode()
     else:
         simple.show_item("Incorrect Password")
 def cancel_signup(self):
     if core.get_value("Please, fill all the inputs"):
         core.delete_item("Please, fill all the inputs")
     if core.get_value("Something went wrong"):
         core.delete_item("Something went wrong")
     core.delete_item("Username##signup")
     core.delete_item("Email##signup")
     core.delete_item("Password##signup")
     core.delete_item("Cancel")
     core.delete_item("Sign up")
     simple.show_item("login_els")
     self.add_login_els()
 def sign_up(self):
     username = core.get_value("Username##signup")
     email = core.get_value("Email##signup")
     password = core.get_value("Password##signup")
     if not username or not email or not password:
         simple.show_item("Please, fill all the inputs")
         return
     result = user_services.signup_user(username, email, password)
     if result:
         self.cancel_signup()
     else:
         simple.show_item("Something went wrong")
Beispiel #9
0
 def compose_workout(self):
     equipment_val = core.get_value("Equipment##widget")
     exercise_type_val = core.get_value("Exercise Type##widget")
     muscle_group_val = core.get_value("Muscle Group##widget")
     if not equipment_val or not exercise_type_val or not muscle_group_val:
         simple.show_item("Fill all the inputs, please.")
     else:
         self.composed_workout = get_composed_workout(
             equipment_val, exercise_type_val, muscle_group_val)
         simple.hide_item("workout_composition_group")
         core.add_table("Workout", ["Exercise", "Sets", "Reps", "Example"],
                        callback=self.toggle)
         for el in self.composed_workout:
             core.add_row("Workout", list(el.values()))
         core.add_button("Cancel##widget")
         core.add_button("Save##widget")
Beispiel #10
0
    def show_status(self, text):
        """Show the status of load and save

        Parameters
        ----------
        text : str
            The status to show
        """

        dpg_core.set_value(self._status_id, text)
        dpg_simple.show_item(self._status_id)
        dpg_simple.show_item(self._status_id_same_line)

        def cb(*args):
            dpg_simple.hide_item(self._status_id)
            dpg_simple.hide_item(self._status_id_same_line)

        dpg_core.run_async_function(
            name=lambda *args: sleep(3),
            data=None,
            return_handler=cb,
        )
Beispiel #11
0
    def layer_slider_callback(self):
        for i in range(0, self.maxNumberOfLayers):
            simple.hide_item(self.layer + str(i))
            simple.hide_item(self.type + '##' + str(i))
            simple.hide_item(self.activation + '##' + str(i))

        for i in range(0, core.get_value(self.numberOfLayers)):
            simple.show_item(self.layer + str(i))
            simple.show_item(self.type + '##' + str(i))
            simple.show_item(self.activation + '##' + str(i))
Beispiel #12
0
def close_popup():
    core.delete_item(core.get_active_window())
    simple.show_item("Create Document from Template")
    def ShowWindow(self):

        simple.show_item(self._window_name)
    def ShowWindow(self):

        simple.show_item(self._window_name)

        self._render_start_scan_window()
Beispiel #15
0
def use_value(sender, data):
    simple.show_item("Create Document from Template")
    core.delete_item(f"Search in DB ({data[0].split('_')[0]})")
    core.set_value(data[0], data[1])
 def show_window(self):
     simple.show_item(self.windowName)
     self.hidden = False
Beispiel #17
0
	def start(self):
		simple.show_item(self.__guid)
		self.__worker = ThreadProgress(self, self.__q, callback=lambda: self.__callback(self.__guid))
		self.__worker.start()