System to handle IPC communication

This commit is contained in:
Geomitron
2020-02-03 23:24:15 -05:00
parent 95c46cad39
commit a4becd92aa
10 changed files with 150 additions and 22 deletions

View File

@@ -3,7 +3,7 @@ import * as path from 'path'
import * as url from 'url'
// IPC Handlers
// import { getIPCHandlers } from './src/assets/electron/shared/IPCHandler'
import { getIPCHandlers } from './shared/IPCHandler'
let mainWindow: BrowserWindow
const args = process.argv.slice(1)
@@ -60,7 +60,7 @@ function createBridgeWindow() {
mainWindow.setMenu(null)
// IPC handlers
// getIPCHandlers().map(handler => ipcMain.handle(handler.event, (_event, ...args) => handler.handler(args[0])))
getIPCHandlers().map(handler => ipcMain.handle(handler.event, (_event, ...args) => handler.handler(args[0])))
// Load angular app
mainWindow.loadURL(getLoadUrl())