Esempio n. 1
0
 def join_session(self, session_id: int) -> None:
     self.destroy()
     task = ProgressTask(self.app,
                         "Join",
                         self.app.core.join_session,
                         args=(session_id, ))
     task.start()
Esempio n. 2
0
 def open_xml_task(self, file_path: str) -> None:
     self.add_recent_file_to_gui_config(file_path)
     self.prompt_save_running_session()
     task = ProgressTask(self.app,
                         "Open XML",
                         self.core.open_xml,
                         args=(file_path, ))
     task.start()
Esempio n. 3
0
 def open_xml_task(self, filename: str) -> None:
     self.add_recent_file_to_gui_config(filename)
     self.core.xml_file = filename
     self.core.xml_dir = str(os.path.dirname(filename))
     self.prompt_save_running_session()
     task = ProgressTask(self.app,
                         "Open XML",
                         self.core.open_xml,
                         args=(filename, ))
     task.start()
Esempio n. 4
0
 def click_stop(self):
     """
     redraw buttons on the toolbar, send node and link messages to grpc server
     """
     logging.info("clicked stop button")
     self.app.menubar.change_menubar_item_state(is_runtime=False)
     self.app.core.close_mobility_players()
     task = ProgressTask(self.app, "Stop", self.app.core.stop_session,
                         self.stop_callback)
     task.start()
Esempio n. 5
0
 def click_start(self):
     """
     Start session handler redraw buttons, send node and link messages to grpc
     server.
     """
     self.app.menubar.change_menubar_item_state(is_runtime=True)
     self.app.canvas.mode = GraphMode.SELECT
     task = ProgressTask(self.app, "Start", self.app.core.start_session,
                         self.start_callback)
     task.start()
Esempio n. 6
0
 def click_stop(self) -> None:
     """
     redraw buttons on the toolbar, send node and link messages to grpc server
     """
     logging.info("clicked stop button")
     self.app.menubar.set_state(is_runtime=False)
     self.app.core.close_mobility_players()
     enable_buttons(self.runtime_frame, enabled=False)
     task = ProgressTask(self.app, "Stop", self.app.core.stop_session,
                         self.stop_callback)
     task.start()
Esempio n. 7
0
 def click_start(self) -> None:
     """
     Start session handler redraw buttons, send node and link messages to grpc
     server.
     """
     self.app.menubar.set_state(is_runtime=True)
     self.app.manager.mode = GraphMode.SELECT
     enable_buttons(self.design_frame, enabled=False)
     task = ProgressTask(self.app, "Start", self.app.core.start_session,
                         self.start_callback)
     task.start()