示例#1
0
async def notify_project_closed(project_id: str) -> None:

    proj_list = ShowMainScreen.Data.WhatEnum.ProjectsList

    await notif.broadcast_event(ProjectClosed())
    glob.MAIN_SCREEN = ShowMainScreen.Data(proj_list)
    await notif.broadcast_event(ShowMainScreen(ShowMainScreen.Data(proj_list, project_id)))
示例#2
0
async def notify_scene_closed(scene_id: str) -> None:

    await notif.broadcast_event(SceneClosed())
    glob.MAIN_SCREEN = ShowMainScreen.Data(
        ShowMainScreen.Data.WhatEnum.ScenesList)
    await notif.broadcast_event(
        ShowMainScreen(data=ShowMainScreen.Data(
            ShowMainScreen.Data.WhatEnum.ScenesList, scene_id)))
示例#3
0
async def notify_scene_closed(scene_id: str) -> None:

    assert get_scene_state().data.state == SceneState.Data.StateEnum.Stopped

    await notif.broadcast_event(SceneClosed())
    glob.MAIN_SCREEN = ShowMainScreen.Data(ShowMainScreen.Data.WhatEnum.ScenesList)
    await notif.broadcast_event(
        ShowMainScreen(data=ShowMainScreen.Data(ShowMainScreen.Data.WhatEnum.ScenesList, scene_id))
    )
示例#4
0
文件: project.py 项目: ZdenekM/arcor2
async def notify_project_closed(project_id: str,
                                show_mainscreen_after_that: bool = True
                                ) -> None:

    proj_list = ShowMainScreen.Data.WhatEnum.ProjectsList

    await notif.broadcast_event(ProjectClosed())
    if show_mainscreen_after_that:  # mainscreen is not shown when running a temporary package
        glob.MAIN_SCREEN = ShowMainScreen.Data(proj_list)
        await notif.broadcast_event(
            ShowMainScreen(ShowMainScreen.Data(proj_list, project_id)))