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