mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-22 15:04:47 +00:00
cleanup for merge
This commit is contained in:
@@ -190,7 +190,7 @@ export = (socket: Socket, app: Electron.App) => {
|
||||
electronSocket.emit('appRequestSingleInstanceLockCompleted', success);
|
||||
|
||||
app.on('second-instance', (event, args = [], workingDirectory = '') => {
|
||||
electronSocket.emit('secondInstance', [args, workingDirectory]);
|
||||
electronSocket.emit('secondInstance', { args: args, workingDirectory: workingDirectory });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@ export = (socket: Socket) => {
|
||||
const window = BrowserWindow.fromId(browserWindow.id);
|
||||
|
||||
const messageBoxReturnValue = await dialog.showMessageBox(window, options);
|
||||
electronSocket.emit('showMessageBoxComplete' + guid, [messageBoxReturnValue.response, messageBoxReturnValue.checkboxChecked]);
|
||||
electronSocket.emit('showMessageBoxComplete' + guid, { response: messageBoxReturnValue.response, checked: messageBoxReturnValue.checkboxChecked });
|
||||
} else {
|
||||
const id = guid || options;
|
||||
const messageBoxReturnValue = await dialog.showMessageBox(browserWindow);
|
||||
|
||||
electronSocket.emit('showMessageBoxComplete' + id, [messageBoxReturnValue.response, messageBoxReturnValue.checkboxChecked]);
|
||||
electronSocket.emit('showMessageBoxComplete' + id, { response: messageBoxReturnValue.response, checked: messageBoxReturnValue.checkboxChecked });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export = (socket: Socket) => {
|
||||
const menu = Menu.buildFromTemplate(menuItems);
|
||||
|
||||
addContextMenuItemClickConnector(menu.items, browserWindowId, (id, windowId) => {
|
||||
electronSocket.emit('contextMenuItemClicked', [id, windowId]);
|
||||
electronSocket.emit('contextMenuItemClicked', { id: id, windowId: windowId });
|
||||
});
|
||||
|
||||
const index = contextMenuItems.findIndex(contextMenu => contextMenu.browserWindowId === browserWindowId);
|
||||
|
||||
@@ -18,7 +18,7 @@ export = (socket: Socket) => {
|
||||
|
||||
socket.on('register-screen-display-metrics-changed', (id) => {
|
||||
screen.on('display-metrics-changed', (event, display, changedMetrics) => {
|
||||
electronSocket.emit('screen-display-metrics-changed-event' + id, [display, changedMetrics]);
|
||||
electronSocket.emit('screen-display-metrics-changed-event' + id, { display: display, changedMetrics: changedMetrics });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export = (socket: Socket) => {
|
||||
socket.on('register-tray-click', (id) => {
|
||||
if (tray.value) {
|
||||
tray.value.on('click', (event, bounds) => {
|
||||
electronSocket.emit('tray-click-event' + id, [(<any>event).__proto__, bounds]);
|
||||
electronSocket.emit('tray-click-event' + id, {eventArgs: (<any>event).__proto__, bounds: bounds });
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -16,7 +16,7 @@ export = (socket: Socket) => {
|
||||
socket.on('register-tray-right-click', (id) => {
|
||||
if (tray.value) {
|
||||
tray.value.on('right-click', (event, bounds) => {
|
||||
electronSocket.emit('tray-right-click-event' + id, [(<any>event).__proto__, bounds]);
|
||||
electronSocket.emit('tray-right-click-event' + id, { eventArgs: (<any>event).__proto__, bounds: bounds });
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -24,7 +24,7 @@ export = (socket: Socket) => {
|
||||
socket.on('register-tray-double-click', (id) => {
|
||||
if (tray.value) {
|
||||
tray.value.on('double-click', (event, bounds) => {
|
||||
electronSocket.emit('tray-double-click-event' + id, [(<any>event).__proto__, bounds]);
|
||||
electronSocket.emit('tray-double-click-event' + id, { eventArgs: (<any>event).__proto__, bounds: bounds });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -181,7 +181,7 @@ export = (socket: Socket) => {
|
||||
|
||||
browserWindow.webContents.session.cookies.removeAllListeners('changed');
|
||||
browserWindow.webContents.session.cookies.on('changed', (event, cookie, cause, removed) => {
|
||||
electronSocket.emit('webContents-session-cookies-changed' + id, [cookie, cause, removed]);
|
||||
electronSocket.emit('webContents-session-cookies-changed' + id, { cookie: cookie, cause: cause, removed: removed });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user