Moved into src folder

This commit is contained in:
Florian Rappl
2023-04-01 23:44:25 +02:00
parent 3470a70572
commit 2367035acd
357 changed files with 5 additions and 16 deletions

View File

@@ -0,0 +1,24 @@
import { Socket } from 'net';
let electronSocket;
export = (socket: Socket, app: Electron.App) => {
electronSocket = socket;
socket.on('appCommandLineAppendSwitch', (the_switch: string, value: string) => {
app.commandLine.appendSwitch(the_switch, value);
});
socket.on('appCommandLineAppendArgument', (value: string) => {
app.commandLine.appendArgument(value);
});
socket.on('appCommandLineHasSwitch', (value: string) => {
const hasSwitch = app.commandLine.hasSwitch(value);
electronSocket.emit('appCommandLineHasSwitchCompleted', hasSwitch);
});
socket.on('appCommandLineGetSwitchValue', (the_switch: string) => {
const value = app.commandLine.getSwitchValue(the_switch);
electronSocket.emit('appCommandLineGetSwitchValueCompleted', value);
});
};