cvpilot-tool/apps/desktop/electron/ipcEvent/index.ts
2024-09-23 13:02:38 +08:00

18 lines
486 B
TypeScript

import { ipcMain } from "electron";
import { registerDicomHandler } from "./dicom/handler";
import { registerCommonHandler } from "./common";
import { registerAlgHandler } from "./alg";
export const registerIpcMainHandlers = (mainWindow: Electron.BrowserWindow) => {
ipcMain.removeAllListeners();
/**
* 等待渲染完成再显示窗口
*/
ipcMain.on("ipc-loaded", () => mainWindow.show());
registerCommonHandler();
registerDicomHandler();
registerAlgHandler();
};