1. getWindowById(id) add undefined check

2. IpcMain add off
This commit is contained in:
yaofeng
2018-05-31 11:05:36 +08:00
parent 949741d992
commit 1bf274a73c
3 changed files with 55 additions and 62 deletions

View File

@@ -46,6 +46,7 @@ namespace ElectronNET.API
public void On(string channel, Action<object> listener)
{
BridgeConnector.Socket.Emit("registerIpcMainChannel", channel);
BridgeConnector.Socket.Off(channel);
BridgeConnector.Socket.On(channel, (args) =>
{
List<object> objectArray = FormatArguments(args);