def _open_gui_from_thread(): """Opens the GUI. Must be called from the GUI thread. """ logger_gui.info(f"Opening GUI: _open_settings={_open_settings}") _cleanup_kivy() gui_main.main(**_open_settings)
def demonstration_example(): user = h_register_dummy_user_device_client() print(f"Username: {user.username}") print(f"Password: {user.password}") main_thread = threading.Thread(target=main_prog.start, daemon=True) main_thread.start() time.sleep(3) main.main(screens.LOGIN_MANUAL, try_auto_login=False)
def auto_login(): """Gui auto login -> explorer""" h_register_dummy_user_device_client() file_changes_json.init_file(empty=True) time.sleep(1) main_thread = threading.Thread(target=main_prog.start, daemon=True) main_thread.start() time.sleep(2) #interface.add_sync_folder(c_paths.normalize_path(c_paths.LOCAL_DATA, "folder1"), "folder1") main.main(screens.REGISTRATION, try_auto_login=True)
def client_only(): main_thread = threading.Thread(target=main_prog.start, daemon=True) main_thread.start() time.sleep(2) main.main(screens.REGISTRATION, try_auto_login=True)
def authentication_only(): main.main(screens.REGISTRATION, authentication_only=True)
def start_from_zero(): main.main(screens.REGISTRATION)